DMX512 is a standard for digital show control networks most commonly used to control lighting fixtures, stage effects and other show-control devices. It is connected using 3-pin or 5-pin XLR connectors.
The DMX512 specification details a number of packet types, each indicated by a start code transmitted at the start of the packet. However, in 99% of cases the only start code used is 0x00, which indicates a standard DMX data packet. Other start codes are used for the RDM extension, testing purposes and various manufacturers propitiatory data.
A standard DMX packet consists of up to 512 8-bit (between 0 and 255) integers. Each integer represents a DMX channel. No channel numbers are transmitted- all packets begin with channel 1 (there is no channel 0 in DMX terminology, although the start code is sometimes referred to as 'slot 0'), and channel numbers are calculated by counting integers sequentially from 1. There is no way to skip channels in a packet- in order to send on channel 1 and channel 512, 512 channels must be sent.
A full packet can be sent up to 44 times per second, although packets with less than 512 channels can be sent at a higher rate. However, in practice 44 Hz is perfectly acceptable for the majority of uses, and configuration of frame rate is rarely required.
A DMX network is connected in a daisy-chain fashion. Each DMX-controllable fixture has a 'DMX IN' port and a 'DMX THRU' (sometimes called 'DMX OUT') port. To connect these together, the 'DMX IN' of the first fixture should be connected to the 'DMX OUT' of the lighting desk/controller, and then each subsequent fixture's 'DMX IN' connected to the 'DMX THRU' of the previous fixture. The DMX512 specification allows for up to 32 devices to be connected in one chain before signal degradation starts to affect further devices.
The DMX512 specification states that the last fixture in a DMX chain must have a 'DMX Terminator' connected to the 'DMX THRU' port. A terminator is simply a male DMX connector with a 120 ohm resistor connected between the data pins. It's purpose is to prevent electrical reflections which could distort the transmitted data. In practice this only becomes a problem with large DMX signal chains.
DMX512 is connected using 5-pin XLR connectors. Although only 3 of the pins are actually used, 5-pin connectors are specified by the DMX512 standard in order to avoid confusion with 3-pin XLR connectors used for audio. This confusion could be particularly disastrous if a high powered audio line is accidentally connected to a lighting fixture. Some manufacturers however (particularly of cheaper and 'budget' equipment) disregard this and provide 3-pin XLR connectors on their equipment for reasons of cost. In this case, simple in-line adapters can be used. Some equipment comes equipped with both 3-pin and 5-pin connectors in order to save hassle.
DMX512 follows standard signal directions in that an output always uses a female connector, and an input always uses a male. It should be noted that this is the opposite of audio cable signal direction.
DMX cable is electrically different to audio cable (another reason why connectors should be differentiated), and although audio cable can be used for DMX connections, it will not provide a reliable connection due to the decreased resistance of the cable. This will result in flickering and drop-outs over long cable runs.