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.

Code for reading data from serial interface

Status
Not open for further replies.

armess

Member level 3
Joined
Sep 22, 2006
Messages
64
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,692
how to recode serial port communication data

Can anybody give a code for reading data from a serial device to be processed by an 8051 microcontroller.
 

These are the register value you have to choose for serial communication

SCON = 0X50; Serial port enable and serial mode selection
TMOD = 0x20; Timer1 selection
TH1 = 0xfd; //Baud rate selection here 9600
TR1 = 1;
TI = 1;
 

As aandavan said that is serial mode configuration of receiving the data from hyperterminal via RXd PIN . SBUF is the serial Register of receiving the data from serial end
 

:idea:

just go through mazid book you will get all the related datas regarding 8051 or try ayala
 

It's all explained here:

h**p://www.8052.com/tutser.phtml#Serial%20Mode
 

SCON = 0X50; Serial port enable and serial mode selection
TMOD = 0x20; Timer1 selection
TH1 = 0xfd; //Baud rate selection here 9600
TR1 = 1;
TI = 1;
 

    armess

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top