This Tech Note details the communications protocol for the Nixie Controller Supply. The controller is based on an ATmega 328P uC with communications via a standard RS-232 style serial link (+3.3 V high / 0 V low), at a speed up to 115200 bps.

<--break->Message format

Top level description

Byte Description
SOH Start of header – value: 0x81
Msg ID Message ID (see below)
Device ID Device ID – the device to which the message is to be sent
Data N Number of bytes in the data section – can be zero*
HCS Header checksum (see section below on how to calculate checksums – both header and data)
x0-xn-1 Data bytes
DCS Data checksum (see section below on how to calculate checksums – both header and data)

* – If there is data in the message, the number of data bytes (N) does not include the data checksum byte!

Message description

Message ID Data bytes (N) Description
ACK 0x01 0 Acknowledge
NAK 0x02 0 Negative acknowledge
Error 0x03 1 Error encountered with reason
Get brightness 0x04 1 Get the brightness of the nixie tube display
Set brightness 0x05 1 Set the brightness of the nixie display
Get colour 0x06 3 Get the colour of the nixie tube “backlight”
Set colour 0x07 3 Set the colour of the nixie tube “backlight”
Get value 0x08 1 Get the value displayed by the nixie tube
Set value 0x09 1 Set the value displayed by the nixie tube
Range = 0-9
Get DP left 0x0a 1 Get the status of the left decimal point display
Set DP left 0x0b 1 Set the display of the left decimal point
Off = 0x00, on != 0x00
Get DP right 0x0c 1 Get the status of the left decimal point display
Set DP right 0x0d 1 Set the display of the left decimal point
Off = 0x00, on != 0x00
Get version 0x0e 2 Retrieve the firmware version for the controller
Get display 0x0f 1 Get the status of the nixie tube being lit
Set display 0x10 1 Set the nixie tube be ‘on’ or ‘off’
Off = 0x00, On != 0x00

Data description

Most messages have fairly simple data packets, i.e., those with only one byte. For those with multi-byte data packets, here is an overview.

Message Bytes (N) Data description
Colour (backlight) 3 Three bytes representing red, green and blue, respectively.
Version 2 Two bytes, using the format: 0xXYZZ, where:
X = Major version number
Y = Minor version number
ZZ = Release number

Calculating the checksum – header and data

The header and data checksums (data checksum as required) are calculated as:

The two’s complement of the sum of the bytes in the header/data.

This can be calculated quite simply by summing all bytes, invert the result and add one (ignoring any overflow which may occur).

– Colin