View Single Post
Old June 12th, 2009   #4
Nigel Worsley
Junior Member
Join Date: Jun 2006
Location: London
Posts: 13

Originally Posted by wcai_cypress View Post
If use UART to implement RDM responder, how to detect the break header during receiving and how to generate break header during transmitting?
For receiving, a framing error with data of 00H can be assumed to be a break.

For transmitting, then assuming that the UART doesn't support sending of breaks then either of the following should work:

1. Set the baud rate to 100kbps and send 00H - after the byte has been sent ( which is usually NOT when the UART is ready for more data, due to a buffering register ) set it back to 250kbps.

2. Turn off the UART, set the I/O pin low, wait for at least 88uS, set the pin high again and turn the UART back on.

The first method has the advantage of accurate and repeatable timing without needing any additional processor resources ( eg. timers ), but does depend on being able to tell when the UART shift register is empty - this is often not possible.
Nigel Worsley is offline   Reply With Quote