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

Back to Subject List

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


 
#156459 - It's pretty much what I showed you - here you go.
Responding to: ???'s previous message
#include <reg52.h>
#include "global.h"
#include "functions.c"

void main()
{
lcd_initialize(); // lcd initialization
write_message("Welcome, please type in your message.");

IE = 0x86; // enable INT1
IT1 = 1;
// output options //
SCON = 0x40; // mode 1, no parity
TMOD = 0x20; // timer 1 mode 2 (auto reload)
TH1 = -26;
TR1 = 1;
//T2CON = 0x34;
//PCON=PCON|0x80; // smod = 1
//RCAP2H = ~(40000/256); // baud rate
//RCAP2H = -(40000%256);
//TR2 = 1;
DATA_INT = 1; // idle

while(1);
}

The whole thing is controlled by interrupts so nothing but the those lines I've pasted before really matters.

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