??? 02/08/09 15:11 Read: times |
#162185 - Wha shuld the value of TMOD? Responding to: ???'s previous message |
Hi again I got the 3 interrupts working(2 external and the timer0) but since my program has to send/recieve data (polling method), the sending and receiving gets affected since it uses timer 1. i think the one that causes the problem is te value of TMOD.
See my code for polling(enable TM1 but not the interrupt: MOV TMOD,#20H ;enable timer1, mode 2 (auto reload) MOV TH1,#0FDH ;9600 Baud rate MOV SCON,#50H ;8 bit, 1 stop bit, REN enabled SETB TR1 and for the TM0: mov TMOD,#00000001b mov tl0,#0b0h mov th0,#03ch setb ET0 setb TR0 setb EA what should be the value of TMOD in this case? |