Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/27/02 04:42
Read: times


 
#31494 - Serial commn in "UMPS"
Hi

I have been trying to simulate the serial commn using the UMPS (Software simulator).

I write a program as follows,

org 00h
mov tmod,#00100000b;Timer 1 auto reload.
mov th1,#253( For baud rate of 19,200, at 11.059 crystal)
setb pcon.7
clr sm0; 8-bit,stop bit enabled
setb sm1
setb ren
clr ri
setb tr1
wait:
jnb ri,wait
mov a,sbuf
loop:
ajmp loop


I configure the resources as follows,

CPU clock frequency 11.059MHZ(Under option / run /crystal freq).
serial transmitter connects to p3.0.
Baud rate at 19200.
No of data bit =8.
stop bit 1
parity = none
word/line=8.
address position =$0000.
display bit =8.
start address=$0000.
end address=$0001.
At address 0000 in the transmitter table,I enter a value 03.

When I run the program and then turn transmit to 'ON', the value in sbuf / ACC is not 03.

I keep getting some other values.


I tried looping by moving the value of ACC into ram as follows

I entered values starting from 00h to oah.

mov r1,#00h
wait:
JNB RI,wait
clr ri
mov a,sbuf
mov @r1,a
inc r1
ajmp wait

Have I missed out something?

Regards
Pramod Kumar

No replies in thread

Back to Subject List