E1.20 RDM (Remote Device Management) Protocol Forums  

Go Back   E1.20 RDM (Remote Device Management) Protocol Forums > RDM Developer Forums > RDM General Implementation Discussion

RDM General Implementation Discussion General Discussion and questions relating to implementing RDM in a product.

Reply
 
Thread Tools Search this Thread Display Modes
Old February 23rd, 2012   #1
PeakPaul
Junior Member
 
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
Default 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.
PeakPaul is offline   Reply With Quote
Old February 23rd, 2012   #2
ericthegeek
Task Group Member
 
Join Date: Aug 2008
Posts: 375
Default

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.
ericthegeek is offline   Reply With Quote
Old February 24th, 2012   #3
PeakPaul
Junior Member
 
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
Default

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.
PeakPaul is offline   Reply With Quote
Old March 2nd, 2012   #4
prwatE120
Task Group Member
 
Join Date: Jun 2006
Posts: 181
Default

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
prwatE120 is offline   Reply With Quote
Old March 2nd, 2012   #5
PeakPaul
Junior Member
 
Join Date: Jan 2012
Location: Buxton, Derbyshire
Posts: 5
Default

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.
PeakPaul is offline   Reply With Quote
Old March 3rd, 2012   #6
Nigel Worsley
Junior Member
 
Join Date: Jun 2006
Location: London
Posts: 13
Default

Quote:
Originally Posted by PeakPaul View Post
once I've detected a FE, I will have lost an undetermined amount of time from the start of the break
The exact amount of time will be dependent on the design of the UART, but should be fairly consistent. If using a typical 16x baud rate clock the variability would be +/- 0.125uS which is totally insignificant, the delay from the start of the break to the FE would typically be about 38uS - equivalent to the start bit, 8 data bits and the mid point of the stop bit. Some UARTS sample on 3 consecutive clocks in the middle of the bit and do a majority vote, which would add a bit to the delay but still less than 1uS.

Nigel Worsley
Nigel Worsley is offline   Reply With Quote
Old March 8th, 2012   #7
prwatE120
Task Group Member
 
Join Date: Jun 2006
Posts: 181
Default

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
prwatE120 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.