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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/26/02 02:03
Read: times


 
#26333 - RE: TIMER can anybody help me?
I always use a timer in Auto Reload mode.
In the TIMER interupt routine, I use a few (a many as I need) RAM locations (or registers), in this example I use RAM locations 30 and 31 and I change bit 90 of P1.
Timing is 256 (RAM 30) * 128 (RAM 31) * (256-timerreload) * (Xtal/12)

Timerinterupt example :

C0 E0 'PUSH A
C0 DO 'PUSH PSW
D2 D3 'select registerbank
D2 D4 'select registerbank
D5 30 08 'DJNZ @ RETI
D5 31 05 'DJNZ @ RETI
75 31 80 'MOV #80 in @ 31 'reload 31 with 80h
'do your thing here,
B2 90 'example
D0 D0 'POP PSW
D0 E0 'POP A
32 RETI

Good luck
Filip

List of 12 messages in thread
TopicAuthorDate
can anybody help me?            01/01/70 00:00      
RE: can anybody help me?            01/01/70 00:00      
RE: TIMER can anybody help me?            01/01/70 00:00      
RE: TIMER can anybody help me?            01/01/70 00:00      
RE: TIMER can anybody help me?            01/01/70 00:00      
RE: pranav, anil            01/01/70 00:00      
RE: pranav, anil            01/01/70 00:00      
RE: pranav, anil            01/01/70 00:00      
`            01/01/70 00:00      
`            01/01/70 00:00      
`            01/01/70 00:00      
RE: 8052AH            01/01/70 00:00      

Back to Subject List