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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…