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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/14/08 17:20
Modified:
  07/14/08 17:24

Read: times


 
#156702 - setting TMOD
Responding to: ???'s previous message
That line existed on the listing
and as it is stated inteferes with Timer1,
should not write anything to upper nibble.

TMOD = 0x09; // timer 0 mode 1

valid should be for Timer0 mode1
    TMOD |= 0x01; // Set Timer0 to mode1 16bit

you may decide what the desired mode of Timer0
is and set it to, without alter the settings
of Timer1.

BTW what is the clock XTAL of the system?
to achive 2400 baud rate using Timer1 at serial port
with reload value -26 these are the combinations:
XTAL / CLKREG.0 /PCON.7(SMOD0) / UART SPEED = THx RELOAD VALUE
12MHz  0=x1  12  1=x2    16      2400             -26
12MHz  1=x2   6  0=x1    32      2400             -26
24MHz  0=x1  12  0=x1    32      2400             -26

K.L.Angelis



List of 37 messages in thread
TopicAuthorDate
Atmel AT89C52 serial port problems            01/01/70 00:00      
   Problem with Serial Port 89C52            01/01/70 00:00      
      Can't be            01/01/70 00:00      
      ATMEL AT89C52 Help?            01/01/70 00:00      
         Why are you considering a discontinued chip?            01/01/70 00:00      
         THIS POST IS IRRELEVALENT TO THIS TOPIC            01/01/70 00:00      
   Seven Hertz            01/01/70 00:00      
      Don't think so            01/01/70 00:00      
   post the whole code...            01/01/70 00:00      
      Pretty much the whole thing - I can add this tho            01/01/70 00:00      
         no main?            01/01/70 00:00      
            It's pretty much what I showed you - here you go.            01/01/70 00:00      
               how do you know WHAT does matter?            01/01/70 00:00      
               how do you use timer0?            01/01/70 00:00      
                  this will be most probably the culprit            01/01/70 00:00      
                     So what you're saying is            01/01/70 00:00      
                        Its timer0 interrupt making trouble            01/01/70 00:00      
                           I dont get it            01/01/70 00:00      
                              none, if            01/01/70 00:00      
                                 funny..            01/01/70 00:00      
                        timer 1            01/01/70 00:00      
                           this IS the program (everything I've posted)            01/01/70 00:00      
   Results + Complete program            01/01/70 00:00      
      evidently you do not blieve in making code readabl            01/01/70 00:00      
         Actually,            01/01/70 00:00      
            double post, please ignore            01/01/70 00:00      
            try a search            01/01/70 00:00      
      Ident Code, Suggestions in many /////////            01/01/70 00:00      
         Question            01/01/70 00:00      
            setting TMOD            01/01/70 00:00      
               24MHz            01/01/70 00:00      
               Done!            01/01/70 00:00      
   NEW - Receiver Promlems            01/01/70 00:00      
      be more specific            01/01/70 00:00      
         A few answers            01/01/70 00:00      
      Got something but still not entirely fixed            01/01/70 00:00      
      look at str_len carefully            01/01/70 00:00      

Back to Subject List