UART Interface

This chapter documents the Nano Safety Controller Pro's UART serial interface — the message structure and the joystick and keypad message formats — and notes that a configuration can use serial or CAN messaging, but not both.

The Nano Safety Controller Pro provides a UART (Universal Asynchronous Receiver-Transmitter) interface for sending and receiving messages.

Serial Message Structure

The following table shows the structure of serial messages.

Table 1. Table 54 Serial Message Structure
Offset Field Length (Byte) Description
0 Header 2 0x1001
2 Type 1 JOYSTICK = 0x50
KEYPAD = 0x51
3 Length 1 Data Length
4 Data x Per message type
message_length-2 Checksum 2

Joystick Message

The following table shows details about the Joystick message.

Table 2. Table 55 Joystick Message
Field Length Description
Left X 16 bit

12bit signed ADC value

Bit 13 dataOK

Max = 0x17FF, Center = 0x1000, Min = 0x1800

Left Y 16 bit See above
Left Z 16 bit See above
Right X 16 bit See above
Right Y 16 bit See above
Right Z 16 bit See above

Keypad Message

The following table provides details about the Keypad message.

Table 3. Table 56 Keypad Message
Field Length Description - Bitmap
Keypad Left 8 bit [6-7]Down [4-5]Right [2-3]Up [0-1]Left
Keypad Center 8 bit [6-7] [4-5]Menu [2-3]Power [0-1]Pause
Keypad Right 8 bit [6-7]”1” [4-5]”2” [2-3]”3” [0-1]”4”

The button values for the keypad message are:

[0]Notset
[1]Set
[2]Error
[3]Unavailable