DMX Output

To communicate with peripherals and other electronic devices, a microcontroller needs to be able to input and output data.

Schematic for a one-bit bidirectional I/O port

The diagram above shows one bit of a bidirectional I/O port. This type of port provides both input and output using the same port I/O pin (right). It may be used to provide a "bus" to connect peripherals. A control latch controls the direction of the transfer (by setting a bit of the W (Write) register into the lower D type latch in the diagram.

Below is a summary of the operations required to read data from a port pin:

Reading can be performed by using a move instruction to clock a '1' into the I/O control latch, which will (via the Q output routed through the OR gate) switch OFF the upper FET (a p-channel type switches OFF when its input is high); simultaneously the '0' fed to the AND gate will switch OFF the lower FET. The output from the data latch is irrelevant as both FETs are OFF and the port is disabled . Data may now be read from the port pin.

Write operations are a little more complex; we have to consider the cases of writing a '0' and '1' separately. In either case we would use a move instruction to clock a '0' into the I/O control latch first, to configure the pin as an output (see below).

Suppose we want to write a '0' to the I/O pin. A move instruction is used to write the '0' to the port pin's data latch, but the inverted Q output is used, so a logic '1' is fed to the OR gate, switching OFF the upper FET; the same logic '1' is also fed to the AND gate whose other input is also '1', so the lower FET is switched ON and the pin's output is at logic '0'.

Suppose now we want to write a '1' to the I/O pin. A move instruction is used to write the '1' to the port pin's data latch, but the inverted Q output is still used, so a logic '0' is fed to the OR gate, and as the other input is also logic '0', this switches ON the upper FET; the same logic '0' from the data latch is also fed to the AND gate (the other input being '1') so the lower FET is switched OFF and the output is at logic '1'.

DMX receivers can be based on a microcontroller platform using DMX Receiver Software.

Output Waveforms

Each slot value accumulated in the shared output array can be used in many possible ways, for example:

A single Receiver can use 100s of slots - something that was not envisaged when DMX 512 set a limit of 512 data slots per frame, and drives the use of multiple universes.

Using Multiple Slots for One Value

Some receivers use a combination of several consecutive slot values as an input to the receiver. A receiver could combine 2 or more consecutive slots to produce a 16 bit or 32 bit control value.

For example, a combination of two slot values results in a 16 bit value by regarding one slot as the high-order byte (coarse level) and one as a low order byte (fine level). This 16b number permits values -32767 to +32768. This value can then be used to drive the orientation of a robotic light (e.g. by driving a Stepper Motor to alter the pan or tilt.


See also:


Prof. Gorry Fairhurst, School of Engineering, University of Aberdeen, Scotland.