Discussion in "8051 Discussion Forum" started by    yadavmahesh    Aug 18, 2010.
Wed Aug 18 2010, 07:08 PM
hi, please help me out with circuit to connect two 89c51, one transmitter nand other receiver. also 7 segment is connected to the receiver side.
i tried it once with the sample i found in this forum but it worked only in proteus not with real hardware.. reply fast plz
Thu Aug 19 2010, 09:43 AM

8051(1) RXD < ----------------------------- 8051(2) TXD

8051(1) TXD -----------------------------> 8051(2) RXD

Please make circuit as above with necessary components and Write Program using Serial Communications Interrupts in Both uC.

Gurpreet Singh


" A person who never make mistakes,never try new things"
Thu Aug 19 2010, 06:38 PM
can you post codes you tried. let me see if there is any problem with code.
Fri Aug 20 2010, 03:25 AM
I am using BiPOM's Micro C:


to have 2 8051 boards ( MINI-MAX/51-C2 ) talk to each other through the serial port. There is a NULL modem cable in between so RXD goes to TXD and TXD goes to RXD.

On both sides, I initialize serial port to 9600 baud using the C function serinit(9600>>1);

I use C function putch() on one side to send bytes to the serial port. I use getch() on the other side to receive the bytes.

I have not tried but it should be fairly easy to add a 7-segment display board like this:


Fri Aug 20 2010, 06:53 AM
i hope you are taking care of pin no.5 i.e. gnd

8051(1) RXD < ----------------------------- 8051(2) TXD

8051(1) TXD -----------------------------> 8051(2) RXD

8051(1) GND <----------------------------> 8051(2) GND
Fri Aug 20 2010, 11:12 AM
i have not grounded pin no. 5 of each, is it neccesary. my code for transmitter n receiver is below.
transmitter side

#include <REGX51.H>
void main()

int sig=0x55; // signal to be transmitted.

TMOD=0x20; // selecting Timer 1, with mode 8bit auto reload.
TH1=0xFA; // setting baud rate = 4800
SCON=0x50; // setting the 8bit Control reg which control the SBUF with RC5
TR1=1; // starting the timer
while(1) // thios point onwards the code is sending 0x55 all the time
receiver side

#include <AT89X51.H>
#define d P2

void main()
char rxdata; // this variable recieves data
TMOD=0x20; // selecting Timer 1, with mode 8bit auto reload.
TH1=0xFA; // setting baud rate = 4800
while(RI==0); // this line will wait for the data to come
rxdata=SBUF; // as soon as the data is recieved its tranferred to a variable so that the next variable doesnt overwrite the data just receieved
RI=0; // clearing the flag.

d=0x24; // 0x24 displays 2 on the 7-seg


Fri Aug 20 2010, 11:18 AM

about circuit

7 segment is LT542. pin no 21 to 27 are connected to 7 pins of 7seg.. vcc is aplied to 3and 8 pin. pin 5 is left unused

8051(1) RXD < ----------------------------- 8051(2) TXD

8051(1) TXD -----------------------------> 8051(2) RXD....>7seg display(common anode)

plz help me for this ..
n thanx for replies
Fri Aug 20 2010, 07:29 PM
you have to make changes in your circuit to free pins required for communication. try moving 7-seg display pin to other unused pin. or better if you can post your schematic here.
Sat Aug 21 2010, 06:06 AM
Is the code I posted above is correct. If not please modify it and would you please mind simulating it in Proteus. I simulated it in Proteus and it worked there.

Mon Aug 23 2010, 11:07 AM
your hardware probably not matching your software then..

coz how is this possible?

8051(1) TXD -----------------------------> 8051(2) RXD....>7seg display(common anode)

i dont see anything in circuit above.

Get Social


Powered by e107 Forum System


Mon Apr 12 2021, 11:54 AM
Joe N
I have recently launched my own site, and I am looking to provide value for you for free, by giving away 26 professional level blog post templates (worth $297).
Mon Apr 12 2021, 09:24 AM
Hey, I think your site might be having browser compatibility issues. When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, very good blog! https://onanadiete.ru/alpha-numeric-reasoning-questions-and-answers-pdf.pdf alpha numeric reasoning questions and answers pdf alpha numeric reasoning questions and answers pdf



Thu Jun 25 2020, 03:46 PM
Mon Jun 22 2020, 03:03 PM
Tue Jun 16 2020, 05:10 PM
Sat Jun 13 2020, 09:43 PM
Thu May 21 2020, 12:44 PM
Thu May 21 2020, 01:28 AM
Wed May 20 2020, 07:05 PM
Wed May 20 2020, 11:52 AM


Guests: 100, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123