??? 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. |