IanP
Advanced Member level 7
- Joined
- Oct 5, 2004
- Messages
- 7,929
- Helped
- 2,311
- Reputation
- 4,624
- Reaction score
- 531
- Trophy points
- 1,393
- Location
- West Coast
- Activity points
- 66,416
8052 timer2
Here is the code I use for Timer2 interrupt:
T2Int: CLR T2CON.7
CLR T2CON.0
PUSH ACC
PUSH PSW
INC ScrollFreq
MOV A, ScrollFreq
CJNE A, #0Fh, T2_Exit
SETB Scroll1Right
T2_Exit: POP PSW
POP ACC
RETI
I want bit Scroll1Right to be set 50 times/s, 5/s .... but as it is now it is set every 10-12 secs.
With ScrollFreq set to 00h this interrupt occures about 3times/sec and that is the fastest.
The T2CON=00h.
Maybe someone fresh can have a look at the above code and find out why the execution is so slow..
Here is the code I use for Timer2 interrupt:
T2Int: CLR T2CON.7
CLR T2CON.0
PUSH ACC
PUSH PSW
INC ScrollFreq
MOV A, ScrollFreq
CJNE A, #0Fh, T2_Exit
SETB Scroll1Right
T2_Exit: POP PSW
POP ACC
RETI
I want bit Scroll1Right to be set 50 times/s, 5/s .... but as it is now it is set every 10-12 secs.
With ScrollFreq set to 00h this interrupt occures about 3times/sec and that is the fastest.
The T2CON=00h.
Maybe someone fresh can have a look at the above code and find out why the execution is so slow..