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.

problem coding 8051 for serial reception

Status
Not open for further replies.

student52

Junior Member level 2
Junior Member level 2
Joined
Jul 21, 2010
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,417
Hi all,


I have programmed 8051 to receive data serially but I couldn't see the data getting copied in the simulator. Please help here is the code I have done

MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
up: JNB RI,up
MOV A,SBUF
MOV P1,A
CLR RI
SJMP up
end

As per the code data should be found in P1. But it is not. Kindly help!!!!!!!!!!!!!!

Thanks in Advance,

Regards.
 

Is it possible that the issue is related to Baud rate or crystal frequency !!
 

Its not about crystal frequency as I have not tried in hardware....... baud rate I set it as 9600 that is standard baud rate

---------- Post added at 17:37 ---------- Previous post was at 17:36 ----------

and i am using a limited version of Keil. Is that a problem?
 

MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
up: MOV SBUF,"A"
JNB TI,$
CLR TI
SJMP up


this code is for writting a letter A , compare it with Yours
i am begging at this field , i hope this help you

also try >> Mov TH1,#0FDH
 

Hi,

Thanks for your response but I want reception of data. ie. I should be able to read the data placed in SBUF.
 

MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB RI1
up: MOV SBUF,"A"
JNB RI,$
Mov A,SBUF
MOV P1,A
CLR RI
SJMP up
end

try this code
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top