Hi all
I am trying to create a reaction timer using the 16f874.
what i am thinking of coding -
So i will "count" the clock cycles using the rtim then store that in the array and send it to pc via serial. then my pc prog can multiply that by .05us to get actual reaction time.
I have simplified the code to show my idea - so i understand the code is incomplete.
The question being will this wok?
thanks
I am trying to create a reaction timer using the 16f874.
what i am thinking of coding -
Code:
dim rtim byte 'keep track of clock cycle w.r.t instruction timing?
dim rtimes(10) as byte 'an array to store 10 timings
getbutton:
if portb.1 = 1 then
rtim = 2 'using the step simuation it shows if using 2cycles
rtimes(0) = rtim + 2
end if
rtim = rtim + 2
goto getbutton
So i will "count" the clock cycles using the rtim then store that in the array and send it to pc via serial. then my pc prog can multiply that by .05us to get actual reaction time.
I have simplified the code to show my idea - so i understand the code is incomplete.
The question being will this wok?
thanks