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 with coding of 8051

Status
Not open for further replies.

Rockyvud

Newbie level 3
Joined
Nov 6, 2006
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,307
I have been trying to control a light bulb through computer interface and usign 8051 microcontroller.I think i am wrong somewhere in microcontroller programming,can someone tell me where? following is the program

org 00h
mov p2,#00H
mov tmod,#20H
mov scon,#50H
mov th1,#
setb tr1
scan:
jnb ri,$
mov p2,sbuf
clr ri
jmp scan
end,
 

u have not set th1 for baudrate.

;9600 baudrate fdh
;2400 bps f4h
.equ baudnum,0fdh ;Baud setting 9600bps
mov th1, #baudnum ;for predefined bps rate
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top