Hi My project involves serial transmission and serial reception. I have dumped the suitable code for the micro-controller(AT9S52) at the transmitter and the receiver. I have simulated both the codes successfully in keil u vision3. The micro-controller is transmitting the serial data without any problem. But the mc at receiver is not receiving any data. I'm not able to understand what the problem is...
My code at the receiver is as follows. The job of the receiver is to just receive any serial data coming. Please help me if there's any amendment I've to make...
#include"reg51.h" void initialize() { SCON=0x50; PCON=0X80; TMOD=0x20; TL1=0x00; TH1=0x5D; TR1=1; RI=0; } void main() { int rdata; while(1) { initialize(); while(RI==0); rdata=SBUF; RI=0; P2=rdata; } }
What about the indentation ??