Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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.
 

aandavan

Advanced Member level 4
Joined
Aug 31, 2006
Messages
106
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Location
india
Activity points
1,932
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;
 

Prabakaran

Full Member level 3
Joined
Jan 22, 2007
Messages
168
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Location
Chennai(India)
Activity points
2,273
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
 

vijaya_narayana

Full Member level 3
Joined
Jun 12, 2007
Messages
172
Helped
11
Reputation
22
Reaction score
1
Trophy points
1,298
Location
India
Activity points
2,158
:idea:

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

x_zoli

Advanced Member level 4
Joined
Jul 22, 2004
Messages
105
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Location
Brasov, Romania
Activity points
786
It's all explained here:

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

jayavardhan

Full Member level 2
Joined
Sep 1, 2006
Messages
126
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,296
Location
India
Activity points
1,851
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top