writting Software UART 8051

Status
Not open for further replies.
hi, im trying to write a software UART , im simulating it in proteus and using a 8051 cpu , 89S52...

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
 
many many thanks !!

i read ur article , can i've the C Code version ?
or at least the project ?
i wrote it and it worked , send me ur email and i will send u mine codes and analyze it ...
 
Last edited:
need software UART 8051

hi,

i need C code for software UART in 8051. because my task is i have to communicate the GSM modem with the 8051 microcontroller. for this i need to receive the message from the gsm and send the msg to the another one microcontroller. so i need two UART. i can communicate the GSM using hardware UART. but i need to communicate the another one microcontroller with this microcontroller by using software uart or any other ways?
 
Or buy a chip with two uart's The at89c51re2 for example...
 
Ok... Then do a software serial... Its up to you.... 8052.com is the best place to be..
 
Of course you can... The hardware UART can be set up with interrupt driven ( or not) and the the software could be polled...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…