Microcontroller › 8051 › serial communication between pc and AT89c52 › im using these codes#include
May 10, 2012 at 8:10 am
#7704
bll
Participant
im using these codes
#include <regx52.h>
unsigned char a ;
void main(void)
{
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
IE=0X00;
while(1)
{
while(RI==0);
a=SBUF;
P1=a;
RI=0;
}
}
but there is a problem at receiving data, i send numbers from 0 to 15, i got them properly at 89c52, but after 15 it doesnt work properly?, i cant see what is the problem.