![]() |
FRAMING ERROR Detection method
Hi All,
Does anyone use the UART "framing error" detection method for detecting the BREAK before MAB when using RDM? This method works fine for DMX, but will it still hold water for RDM? How are you guys controlling the timing of these events in your micros? Regards Paul. |
A framing error isn't enough to reliably detect a break, especially in the presence of noise on the DMX line or during discovery.
Your best bet is to use a timer/counter to measure the amount of time that the line is held low. This allows you distinguish a framing error from a true break. If you see a framing error during an RDM packet, treat it like you would a checksum error and ignore the packet. |
Thanks Eric, I'll have to look into using an external interrupt on the UART pin, then switching the UART on when we have a valid break.
|
It should be possible to use a timer in conjunction with the UART framing error detection, especially if you look at the data returned by the UART during the framing error.
I have many sucessfull DMX/RDM receiver designs that do not need to resort to using a second external irq. I think want Eric meant is : "dont just assume that a Framing Error" is a break. Peter |
Thanks Peter for your reply, can you elaborate a bit more on the method of how to do this because once I've detected a FE, I will have lost an undetermined amount of time from the start of the break I assume?
Paul. |
Quote:
Nigel Worsley |
A bigger issue in timing accuracy may well be the latency of your interrupt handler. Nigel has already noted that the time between the start bit and the UART's determination of a FE will be failry consistent. Of course you also need to consider the "data" the UART acquired at the time of the FE. If it is not 0x00, it may well be a FE, but is most certainly not the beginning of a BREAK.
Peter |
All times are GMT -6. The time now is 10:35 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2023, vBulletin Solutions, Inc.