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

How is the full-duplex?

1. Can I use the RTX51tiny to implement the full-duplex of the serial port?
(to receive and transmit simultaneous)..

  • The full-duplex is fine. I don't see why you can't do this. Just write your own putchar() and getchar() functions that use your own, custom buffering scheme.

    Since the RI and TI interrupt vector to the same location, you can't really have full duplex comm. in the strictest sense since you must deal with incoming SBUF data before sending out the next SBUF outgoing data (or vice versa). But in the end, it will appear to be full-duplex with only one character handling time (worst case) of extra latency.

    - Mark

  • If I was transmitting a string ,at middle time I needed to receive another string .Should I use the RTX51 to implement this job ?


    Thanks
    Brian...

  • You certainly do not need an RTOS to do this. I have yet to use RTX-51 or any other RTOS for any of my 8051 projects in the last 10 years.

    Mind you, I would like to try it some time but for ISR based UART operation I typically create independent, 256 byte Tx and Rx ring buffers in XDATA and then write putchar() and getchar() to put into and take out of their respective ring buffers.

    The only tricky thing is to make sure putchar() knows to flip the TI bit when starting a transmission while the transmitter is idle (nothing in the Tx ring buffer and nothing being shifted out).

    - Mark