docs/dmx.txt
author Tero Marttila <terom@paivola.fi>
Thu, 29 Jan 2015 23:11:44 +0200
changeset 107 05707929ff6f
parent 62 2d68a76322cb
permissions -rw-r--r--
qmsk.web.async: handle HTTPExceptions

## Specs:

* 250 kHz clock
    * 250000 bits / s
    * 4µs / bit
* idle line = high (transmitter/master drives line high)

## Pinout

    1       0       GND
    2       -       B
    3       +       A

## Protocol

* paket format
    * break
    * mark (MAB)
    * 2-512 frames
        * frame 0 = start code = 0x00
        * frame N = channel N = 0-255
        * 1 start bit, 8 data bits, 2 stop bits, no parity
        * mark (MTBF)
    * mark (MTAP)

* break
    * syncs start of DMX packet
    * >= 22 low bits (88 µs)
    * up to 1s
    * recommended 25 - 30 low bits

* mark after break (MAB)
    * immediately follows the break
    * high mark of > 2 bits (8µs)
    * up to 1s
    * recommended 3 high bits

* (channel frames)
    * first frame is start code (SC)
        * data value = 0x00 signifies dimmer data

    * 11 bits / frame
        * 1 low bit (start bit)
        * 8 data bits (0-255)
        * 2 high bits (stop bits)
 
    * mark time between frames (MTBF)
        * idle time between frames; line kept high
        * can be as short as desired

    * between 1 and 512 sequential frames

* mark time between packets (MTBP)
    * after the last frame's stop bits
    * same as MTBF
    * idle time between packets; line kept high
    * can be as short as desired