Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

send and receive data in a serial manner by using 89s52 in C

Status
Not open for further replies.

Crazy_Engineer

Junior Member level 3
Joined
Aug 7, 2010
Messages
30
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,433
How to send and receive data in a serial manner by using 89s52 in C? I am wanting to do an inter micro-controller communication...Actually it will be better if u help me building the c code...Please help...its urgent!!
 

Get a book "8051 Microcontroller by Mazidi & Mazidi. You will find the detail about what you are looking for and yes your C code too
 

#include<reg51.h>

main()
{
TMOD=0x20;
SCON=0x50;
TH1=0xfd;
TR1=1;
while(1)
{
//SENDING PROGRAM

SBUF='m';
while(TI==0);
TI=0;
//receive PROGRAM

while(RI==0);
a=SBUF;
RI=0;

}
}
 

Hi mitultaillor
If the program written for 89c51, will that also work for 89s52??
 

Yes, but just make sure that you have the same I/O
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top