we are using the schematic
to establish comm between 89s52 and serial port. We are using 22uf caps instead of the 1uf caps rest of the circuit is identical and we are providing supply to both the ICs from a seperate adapter thru a 7805. We are using the following c code
to communicate with the uC but no comm. is established.The serial port monitor shows following output
.Since the serial port monitor shows proper output and no effect is seen on the uC side we feel there is something wrong with its programming here is the program we have loaded into the uC
#include<reg51.h>
void main()
{
unsigned char mybyte;
SCON=0x50;
TMOD=0x20;
TH1=-18;
TR1=1;
while(1)
{
while(RI==0);
mybyte=SBUF;
P1=mybyte;
RI=0;
}
}
The Keil simulator shows a baud rate of 4772 whiole COM1 port baudrate is 4800
Please help us with establishing this protocol!!!!