??? 06/18/04 12:59 Read: times |
#72712 - RE: UART Responding to: ???'s previous message |
hello ,
I am serious about what I am asking you. I am asking you because I didnt get required solution. Any way I ma using atmel's AT89C5122 controller I just want to receive a character from hyper terminal then interrupt occures there I ma glowing one LED of my development board. please suggest me where am I going wrong. and my code is //*************************************************** #include "AT8XC5122.h" #include "EXT5122.H" void delay() //10 msec { int xdata m,n; for(n=0;n<4;n++) for(m=0;m<600;m++); } //**************************************************** void transmit_byte(unsigned char me) { SBUF=me; if(TI==1) { LED5 = 0; } delay(); TI=0; } //***************************************************** void receive(void) interrupt IRQ_UART { RI=0; LED1 =0; transmit_byte('S'); } main() { SCON = 0x50; TMOD |= 0x20; EA=1; //ES=1; TH1 = 0xf7; /* TH1: reload value for 2400 baud */ TR1 = 1; TI = 1; /* TI: set TI to send first char of UART */ //transmit_byte('S'); } |
Topic | Author | Date |
UART | 01/01/70 00:00 | |
RE: UART | 01/01/70 00:00 | |
RE: UART | 01/01/70 00:00 | |
RE: UART | 01/01/70 00:00 | |
Keil examples | 01/01/70 00:00 | |
RE: UART![]() | 01/01/70 00:00 |