We’ve designed lots of DMX equipment over the years.  Here’s our very simple guide:

 

Set the UART port up as 250k baud, 1 start bit, 2 stop bits, no parity bit.

250k baud means each bit is sent at 4uS intervals.  There are 11 bits sent for each byte: 4uS * 11 = 44uS per byte.

To send a frame of DMX:

Generate a Break (TX pulled low for at least 88uS, recomended > 130uS to allow for bad equipment).

Generate a MAB (Mark After Break – TX left high for min 8uS, max 100 to 200uS – some devices are sensitive to too long break time).

TX the start code 0x00

TX between 24 and 512 bytes of DMX level data (512 is normal but you can send less)

Receivers are set with a start address and will get their level data from that byte number within the 512 bytes of level data

That’s it, just keep resending it at least a 1 frame every 1.4 (?) seconds to stop a receiver deciding data is lost, but as fast as possible in reality to give good fade resolution as the levels change

The complication is typically just being able to generate the Break, as not all uarts can do it. If not you have to find a workaround, which on a microcontroller is typically accomplished by turning the uart off and setting the pin low, before turning it back on and carrying on.  If your working with a high level OS (operating system) then check you can work with the port to create the Break and MAB with suitable timings.

Refresh Rate

Minimum 512 channel packet length is 23mS.  The maximum advisable refresh rate is around 30mS before slowness becomes noticeable during fades (aim for 30mS or better).

Hardware

A typical RS422 or RS485 IC is all that is needed, e.g. a MAX483 or MAX3483.  The last device on the bus needs a 120ohm resistor across the D+ and D- connections to terminate it (stop signal reflections back down the bus)

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *