??? 10/26/05 14:57 Read: times |
#102972 - Time 2 problem Responding to: ???'s previous message |
Hello Guys
Thanks for your help, after going through your comments and reading datasheet number of times, I tried the following code,(just to generate 1ms toggle effect on P1.7). It is not working, why? I wish I know. The program just refuses to go into interrupt routine, I have tried the same program with timer 1 and it just works fine. ORG 00H LJMP MAIN ORG 002BH LJMP T2ISR MAIN: MOV P1,#0FFH MOV IE,#0A0H MOV T2CON,#04H ;//Initialising Timer 2 as in 16bit auto- MOV T2MOD,#02H reload mode SETB TF2 SJMP $ T2ISR: CLR TR2 MOV TH2,#-1000 MOV TL2,#-1000 SETB TR2 CPL P1.6 RETI END I would appreciate any assistance Regards Kaz |