Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/04/02 16:52
Read: times


 
#21422 - RE: 3 seconds Timer
Depends on clock speed. The 'standard' way of delys longer than the time will cover at said frequency, is to count timer incidents in the corresponding timer interrupt.

counter ds 1

init:
set counter to 150
set Th, Tl for 20 msec
start timer

main:
if counter = 0 time has passed



timer ISR
stop timer
if counter = 0, exit
decrement counter
set Th, Tl for 20 msec
start timer
exit

Have fun,

Erik



List of 2 messages in thread
TopicAuthorDate
3 seconds Timer            01/01/70 00:00      
RE: 3 seconds Timer            01/01/70 00:00      

Back to Subject List