Monday, 29 September 2014

dmx512 - What is the relationship between DMX and RS485? Are there any breaks in the protocol in relation to one another?


As far as the DMX is RS485 and at what points one moves away from the other? breaking the standard/protocol?



Answer



Basically RS485 is a description of a bidirectional communications hardware interface in which devices speak a known, but adjustable baudrate and byte/character encoding is very similar to RS232. How you could send data-packets is described in versions or adaptations of the standard, but it's not very strictly adhered to. RS485 is commonly 2 wire for bidirection, but may some times be 4 wire with one pair in and the other out. But often when that happens it's more likely to be referred to as RS422 as this standard strictly defines those 2 separate pairs.


The DMX standard uses that RS485 (or, for clarity RS422 would be better) standard for its hardware medium description, but that's where it ends.


The DMX standard is very strict: Each pair is unidirectional (like RS422), it uses longer mark and space times between datablocks than specified in computer Serial communication. It then pumps out the bytes pretty much in a similar fashion, grouped per "frame". Its speed is strictly defined at 250kBaud. No device bearing the DMX mark may use any other speed. Addressing is done purely based on the position of a byte in the frame, so to get channel 64, you need to send all the channels before it too. Though there is also a frame number, which can be abused, but that is very commonly not supported by any existing hardware.


So that is a very well defined standard for the software/data level that's incredibly strict compared to RS485/RS422.


So, in fact, only the cabling specification is strictly the same, because DMX prescribes/suggests the use of slew-rate limited drivers designed for the 250kBaud, in stead of general ones that might be able to handle into the Mbits, to prevent some extra noise on lower quality cable (never trust an audio engineer with your electrons!)





EDIT:


So to conclude, it mostly extends, but if you want to see it as "breaking", you could say that the slew-rate (= sort of the rise-time and fall-time) limitation is a kind of breaking as RS485 was probably intended to be as flexible as possible. On the other hand, DMX chose a nice round number at what was then the top of the range and added protections to avoid pick up of "ridiculous" frequencies, that we would now consider for actual data.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...