- This topic has 1 reply, 2 voices, and was last updated 13 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › RS232 and Microcontroller 80s52
Hi, I am helping my friend in making a small program for 80s52 with serial cable (RS232). The function of the program is to accept serial data from computer to microcontroller, then the microcontroller transfer the same data back to the computer. The transfer is using rs232. I use hyper terminal on PC to check the program. I have download the program to my microcontroller, but when I test it, for some data is returned normally, but some else isn’t (usually the early data is correct)
Can anyone tell me what’s wrong with that?
Thank’s
This is my program (on assymbly):
org 0h
jmp start
org 23h
jmp cekserial
org 30h
start:
mov tmod,#20h
mov th1,#0fdh
mov scon,#50h
mov pcon,#80h
mov tcon,#01000000b
setb tr1
setb es
setb ea
loop: sjmp loop
cekserial:
jb ti,terimaserial
mov a,sbuf
clr ri
mov sbuf,a
reti
terimaserial:
clr ti
reti
would you like to eat maggi which is over coocked…..
this site has given explanation how to establish the serial communication b/w micarocontroller and PC
link:
http://www.engineersgarage.com/microcontroller/8051projects/interface-serialport-RS232-AT89C51
why you want to wear old shoes on the first date when yesterday you bought a new pair….
assembly is too old go for C… still if you want assembly code complie the C code in keil it will give the assembly code for it