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.

sending via 8051 uart -help me with the codes

Status
Not open for further replies.

johannf

Newbie level 1
Joined
Mar 17, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
sending via uart

hey guyz, i need to send this via 8051 uart

0xF5
0x0C
0
0
0
0
0x0C
0xF5



can someone help me with the codes?.........
asm or c is welcome.......
 

sending via uart

make a serial port routine
like
'TransmitChar(uchar);
and transmit every Character.
 

Re: sending via uart

example:

msg: db 0F5h,0Ch,0,0,0,0,0Ch,0F5H
msglen equ $-msg+1 ; 8




.
.
.
start:
mov sp,#SP_START
mov TL1,#0FDh ; baude
mov TH1,TL1 ;

mov TMOD,#21h ; T1 mode 2
setb tr1 ; start timer
mov SCON,#50h ;
clr ea

.
.
.
mov dptr,#msg
mov r1,#msglen
setb ti
acall send
.
.
.
.
.

send:
clr a
movc a,a+@dptr
jnb $ ; wait end transmit
clr ti
mov sbuf,a
inc dptr
djnz r1, send
ret
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top