This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

simulating the serial port

i make a small program which includes initializing the baud rate, serial port1 control and what mode it would operate. I also include this:

mov a, #33h
mov scon1, a
mov a, #00h
mov a, scon1

when i run the simulation, #33h was put to the accumulator and it was transferred to sbuf1..and the accumulator was reset to 00h. However, it didn't get 33h from sbuf1 back to accumulator. and i wonder why???

Parents
  • im sorry.. my mistake it is supposed to be

    sbuf1..not scon1

    im just simulating it in keil.. i have a program that would read a data from serial port1 but when i try simulating it in keil, i noticed that the sbuf1 cannot move its data to the accumulator..

    i haven't tested it in actual design, im just simulating my program in keil only...

    by the way it is my first time to use 8051, my first program, and thanks for your replies i really do appreciate it.

Reply
  • im sorry.. my mistake it is supposed to be

    sbuf1..not scon1

    im just simulating it in keil.. i have a program that would read a data from serial port1 but when i try simulating it in keil, i noticed that the sbuf1 cannot move its data to the accumulator..

    i haven't tested it in actual design, im just simulating my program in keil only...

    by the way it is my first time to use 8051, my first program, and thanks for your replies i really do appreciate it.

Children