DMX-512 is a Digital Multiplexing standard which allows the control of 512 dimmers in a daisy chain fashion. Despite its numerous limitations, it has flourished around the world as a theater lighting standard.
This provides a basic technical overview of the standard for those wishing to implement or troubleshoot it.
DMX-512 was created so that one could have minimum of three wires going from a lighting console (Master) to/through a number of dimming packs, instead of having several dozen wires each carrying 0-10VDC going to the dimming packs. There is also an analog multiplexing standard, AMX-192, which is not widely used, but seems to be referenced every time I see a resource for DMX-512.
Please support this site: If you find this information useful, interesting, or entertaining, please help me by voting for my entry on the MyPIC32 contest, and learn more about Microchip's new line of 32 bit microcontrollers. By viewing a few of the contest entries each week you will be eligible for community prizes, such as an iPod Touch. Thanks!----------
The USITT 'keeps' the DMX-512 standard, they just charge you for a copy, and hold all distribution rights. I'm not allowed to reprint or copy the standard. I'll give a quick overview, and link a resource or two for you. Note that they charge non-members of their group about $30 for the standard, not too pricey. The older standard (1990) is now only $18, and the new standard only adds a few features and is backwards compatible.
NOTE: This description is fine for experimenting, but you should probably obtain the actual spec from USITT before developing anything serious.
The basic DMX-512 signal is a 250kbps serial signal, eight bits data, one start bit, two stop bits, and a frame start break traveling on the RS-485 standard. A frame contains 513 bytes, the first byte was intended to contain a device number, which was never defined as anything but 0, the remaining 512 are the values each device is supposed to receive. Device 0 will only use the second byte of each frame, device 13 will use the 15TH byte of the frame, etc. So a typical frame will contain a logic low for 88uS or greater (Frame break/start) then a logic high for greater than 7uS (two stop bits), then a logic low start bit of 4uS, eight bits of data, each 4uS, LSB first, then logic high for greater than 7uS. This enables each light to be updated some 40+ times each second. Each device is supposed to hold their last setting for up to 1 second if the signal stops. There is no checksum or error correction of any kind. You may note that for lighting this is ok, if a light has been getting 0 for the last few seconds, and suddenly gets a 128 due to noise, it doesn't have time to change brightness noticeably before the next value comes. Therefore it is to be used only for non-critical systems (i.e., no flash pots, props or other dangerous equipment). There is only one signal source, though there are devices available which will take two sources and transmit one signal containing the higher value of each source per channel.
The typical method of generating a DMX512 signal is setting the UART to 250Kbps. Drive the UART line low for a break, then start sending 513 bytes. Since the rate is fixed you can use a timer to determine when you can start another break and data frame. Alternately, loop the output into the UART input and wait until you've received all the data you just sent.
The typical method of receiving DMX512 is to setup the UART to receive a 250Kbps serial signal, then wait for a frame error. A break does not have the two required valid stop bits, but looks like a start bit. This causes the UART to report a framing error. You will likely see one or more frame errors in a row until the real data starts. Then simply collect the data until the next frame.
It was in 2001 that they started updating the standard. I haven't reviewed it so I don't know what changes have been made. Other websites (linked below) will likely have what you're looking for.
Of particular note is Kelly Kohls DMX-512 PICMicro GPL code for DMX-512. He has implemented DMX-512 sources and receivers.