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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/06/08 12:56
Read: times


 
#156425 - Atmel AT89C52 serial port problems
Hello,

I'm trying to send some data through Atmel's AT89C52 serial port but I'm getting some problems.

my settings:


SCON = 0x40; // mode 1, no parity
TMOD = 0x20; // timer 1 mode 2 (auto reload)
TH1 = -26;
TR1 = 1;


When I send something out (sbuf = ..) and measure the signal's frequency through an osciloscope I get something like.. 7Hz when in reality it should be around 2400Hz (2400 baud rate)


Anyone knows what am I doing wrong?

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