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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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?

List of 28 messages in thread
TopicAuthorDate
Multi Tasking in 8051            01/01/70 00:00      
   No need            01/01/70 00:00      
   to get a taste of it...            01/01/70 00:00      
      Or Not            01/01/70 00:00      
         I am thinking of implementing the superloop            01/01/70 00:00      
            It is one way            01/01/70 00:00      
      microcontroller vs microprocessor            01/01/70 00:00      
         Broad range of microcontrollers            01/01/70 00:00      
   I need help again!!!            01/01/70 00:00      
   Timer + conditional loop.            01/01/70 00:00      
      How do I implement the Interrupt Driven Serail Comm?            01/01/70 00:00      
         Samples            01/01/70 00:00      
         Own work            01/01/70 00:00      
            I am also looking            01/01/70 00:00      
               So where did you get stuck?            01/01/70 00:00      
               it will not            01/01/70 00:00      
               That *is* the trouble with sample code!            01/01/70 00:00      
               look at code library            01/01/70 00:00      
                  You have to read and understand            01/01/70 00:00      
   Some useful links here            01/01/70 00:00      
      Wha shuld the value of TMOD?            01/01/70 00:00      
         what is in TMOD now?            01/01/70 00:00      
            it does not work            01/01/70 00:00      
               what happens to T1 when            01/01/70 00:00      
                  I don't know what happens to TI            01/01/70 00:00      
                     time for some basic debugging            01/01/70 00:00      
                        tx and gnd shorted            01/01/70 00:00      
                           New question, new thread            01/01/70 00:00      

Back to Subject List