ahmedragia21
Member
hi, im trying to write a software UART , im simulating it in proteus and using a 8051 cpu , 89S52...
i dont know but in the virtual terminal it should display the chracther A but it doesnt ... i dont know really why
Code:
void main()
{
TMOD=0x20;
TH1=-3;
SCON=0x50;
TR1=1;
while (1)
{
unsigned char a;
a=0x41; // Send Characther A
P3_7=1; //
P3_7=0; // Start Bit
delayms(1);
for (i = 0; i < 8; i++) { // send the bits
b[i] = a & 1; a = a >> 1;
P3_7=b[i]; // Pin_3.7
delayms(1);
}
i dont know but in the virtual terminal it should display the chracther A but it doesnt ... i dont know really why