Hi,
I want to build a reaction timer, but I have questions.
I want to turn on an led and after an amount time the led will
turn off. When the led turns off the user will press a button and
then the display will run and then stop to display the amount of time
between the led turning off and the button press.
Right now I am using a 12F683 but I can use a different PIC.
My questions are how to deal with the button.
How do I handle the button debounce? I wrote a button debounce ISR
but anything with a button will cost some time. How do I calculate the
button press/ debounce time and then correct for it for the displayed time?
I am also a little confused about starting and stopping the clock because
I am starting it internal to the program and stopping it by an external, push
button, event.
Finally, I am using a MAX7219 for the display via its SPI interface, is it better
to use the PIC to control the 7 segment displays directly?
If anyone could give me some direction I would greatly appreciate it.
Dave
I want to build a reaction timer, but I have questions.
I want to turn on an led and after an amount time the led will
turn off. When the led turns off the user will press a button and
then the display will run and then stop to display the amount of time
between the led turning off and the button press.
Right now I am using a 12F683 but I can use a different PIC.
My questions are how to deal with the button.
How do I handle the button debounce? I wrote a button debounce ISR
but anything with a button will cost some time. How do I calculate the
button press/ debounce time and then correct for it for the displayed time?
I am also a little confused about starting and stopping the clock because
I am starting it internal to the program and stopping it by an external, push
button, event.
Finally, I am using a MAX7219 for the display via its SPI interface, is it better
to use the PIC to control the 7 segment displays directly?
If anyone could give me some direction I would greatly appreciate it.
Dave