![]() |
|
RDM General Implementation Discussion General Discussion and questions relating to implementing RDM in a product. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
|
![]()
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. |
![]() |
![]() |
![]() |
#2 |
Task Group Member
Join Date: Aug 2008
Posts: 382
|
![]()
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. |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
|
![]()
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.
|
![]() |
![]() |
![]() |
#4 |
Task Group Member
Join Date: Jun 2006
Posts: 181
|
![]()
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 |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
|
![]()
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. |
![]() |
![]() |
![]() |
#6 | |
Junior Member
Join Date: Jun 2006
Location: London
Posts: 13
|
![]() Quote:
Nigel Worsley |
|
![]() |
![]() |
![]() |
#7 |
Task Group Member
Join Date: Jun 2006
Posts: 181
|
![]()
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 |
![]() |
![]() |
![]() |
Bookmarks |
Thread Tools | Search this Thread |
Display Modes | |
|
|