Skip to content

Protocol Reference

ajcord edited this page Nov 6, 2014 · 3 revisions

Serial interface settings

To connect to the serial interface via a PC, first plug the adapter into the computer using a USB type A to mini-B cable. The settings for the virtual serial port are 9600/8-N-1:

  • 9600 bits per second
  • 8 data bits per byte
  • No parity
  • 1 stop bit

You will need to know the port to use for communication. On Windows, check the Device Manager. On OS X and Linux, open Terminal and type or paste ls /dev/tty* to find the USB device.

Command bytes

Command Name Description Following Data
0x00 Heartbeat Polls the Arduino, which responds with 0x00. None
0x01 Enable restricted mode Polls the Arduino, which responds with 0x01, and enables restricted commands. None
0x10, 0x11 Set single channel Sets a single channel. Last bit of command denotes upper bit of channel number. Next byte is LSB of channel number. Third byte is new channel value.
0x12, 0x13 Increment single channel Increments a single channel by 1. Last bit of command denotes upper bit of channel number. Next byte is LSB of channel number.
0x14, 0x15 Decrement single channel Decrements a single channel by 1. Last bit of command denotes upper bit of channel number. Next byte is LSB of channel number.
0x16, 0x17 Increment single channel by value Increments a single channel by the specified amount. Last bit of command denotes upper bit of channel number. Next byte is amount to increment.
0x18, 0x19 Decrement single channel by value Decrements a single channel by the specified amount. Last bit of command denotes upper bit of channel number. Next byte is amount to decrement.
0x20, 0x21 Set 256 channels Sets 256 channels at once. Last bit of command denotes upper bit of channel block. Next 256 bytes are channel values. Sets channels 0-255 if command was 0x20 or 256-511 if command was 0x21.
0x22, 0x23 Set block of channels Sets a block of channels at once. Last bit of command denotes upper bit of start channel. Next byte is LSB of start channel number. Third byte is number of channels to set (X). Next X bytes are new channel values.
0x24 Increment all channels by value Increments all channel by a value. Next byte is amount to increment.
0x25 Decrement all channels by value Decrements all channel by a value. Next byte is amount to increment.
0x26 Set all channels to value Sets all channel to the same value. Next byte is new value.
0x27 Set 512 channels Sets 512 channels at once. Next 512 bytes are channel values.
0x30, 0x31 Copy 256 channels Copies 256 channels between 0-255 and 256-511. Last bit of command denotes direction: 0x30 copies 256-511 to 0-255, and 0x31 copies the other direction. None
0x32 Exchange 256 channels Exchanges 256 channels between 0-255 and 256-511. None
0x40, 0x41 Get single channel value Gets the value of a single channel. Last bit of command denotes upper bit of channel number. Next byte is LSB of channel number.
0x42 Get all channel values Gets the value of all channels. None
0xDB Debug Sets the LED to blink in the debug pattern. None
0xE0 Stop DMX Stops transmitting DMX. None
0xE1 Start DMX Starts transmitting DMX. Note that DMX is set to transmit upon power up. None
0xE2, 0xE3 Set max channels Sets the maximum number of channels to transmit. Last bit of command denotes upper bit of channel number. Note that a value of 0 sets the max channels to 512. Next byte is LSB of number of channels.
0xE4 Start digital blackout Transmits 0 for all channels, keeping the old values in memory. None
0xE5 Stop digital blackout Transmits channels as they were before the digital blackout. None
0xF0 Shut down Shuts down the Arduino, which echoes and then sends an EOT packet. Only works in restricted mode. None
0xF1 Reset Soft-resets the Arduino, which echoes and then sends an EOT packet. Only works in restricted mode. None
0xF8 Status request Responds with the current status flags. None
0xF9 Error request Responds with the current error flags and then resets them. None
0xFA Version request Responds with the 3-byte protocol and firmware versions, little-Endian style. None
0xFB Protocol version request Responds with the 3-byte protocol version, little-Endian style. None
0xFC Firmware version request Responds with the 3-byte firmware version, little-Endian style. None
0xFD Temperature request Responds with the approximate 4-byte core temperature in millidegrees Celsius, little-Endian style. None
0xFE Uptime request Responds with the 4-byte uptime in milliseconds, little-Endian style. None

Status Codes

Bit Name Meaning
0 DMX Enabled DMX is enabled
1 Digital Blackout Enabled Digital Blackout is enabled
2 Restricted Mode Restricted commands may be executed
3 Debug Mode The LED is blinking in the Debug flash pattern
4 Received Handshake The Ready Check packet has been received
5 Sent Shutdown Warning The auto shutdown warning has been sent
6 Serial Diagnostics The command being processed was received over serial, not TI Link.
7 Error Status Errors have occurred since last error request

In normal operating mode, the status flag byte should equal 0x11.

Error Codes

Bit Name Description
0 DMX Disabled Error Received DMX command when DMX was disabled
1 Digital Blackout Error Received DMX command when digital blackout was enabled
2 Restricted Mode Error Received restricted command when not in restricted mode
3 Invalid Value A command contained an invalid parameter value
4 Timeout Communication timed out
5 Bad Packet A packet was malformed or had an invalid checksum
6 Unknown Command An unknown command was received
7 Unknown Error An error occurred, but the exact cause cannot be determined

In normal operating mode, the error flag byte should equal 0x00.

Clone this wiki locally