Data Encoding

The data in the ATSHA204 is encoded in the following way. Manufacturer name, product name, product revision, and serial number are stored as 0 terminated ASCII strings. This allows all the strings to have variable length. Minimum voltage, maximum voltage, and required current are stored as unsigned 16-bit integer values at the last six bytes of the OTP memory zone. The byte ordering is big endian.

It is required to know the entire content of the OTP zone before locking it. All unused bytes in the OTP memory have to be written to a known value. All unused area of the OTP memory, meaning all bytes between the last ASCII string (terminated with the ‘\0’ character) and the six bytes for the max./min. values are filled with 0xFF. These bytes are marked as DUMMY BYTES in the example table below.

It is also required to know the entire content of the data memory prior to locking the OTP zone, thus the entire data memory is filled with 0x00. The data zones are not locked for writing so it is possible, if desirable, to write updated information about the kit in the data memory. The table below shows an example of a preprogrammed memory for a fictional extension board called "Sensor Xplained".

Table 1. Exampled Content for the ID Device
Data field Example content Data type Byte position
Manufacturer Atmel’\0’ ASCII string OTP[0:5]
Product name Sensor Xplained’\0’ ASCII string OTP[6:21]
Product revision 01’\0’ ASCII string OTP[22:24]
Product serial number 0200000002’\0’ ASCII string OTP[25:35]
DUMMY BYTES 0xFF, 0xFF, 0xFF... Byte OTP[36:57]
Minimum Voltage [mV] 1600 Unsigned 16-bit integer OTP[58:59]
Maximum Voltage [mV] 3300 Unsigned 16-bit integer OTP[60:61]
Required Current [mA] 50 Unsigned 16-bit integer OTP[62:63]
Info:

All ASCII strings are terminated with the value 0x00 (‘\0’)

Info:

Four bytes are used for string terminations (‘\0’), six bytes are used for max./min. values storage. That leaves 54 bytes for ASCII characters. This means that the combination of manufacturer, product name, revision, and serial number cannot exceed 54 characters.

Info:

The minimum and maximum voltage parameters is used if the Xplained Pro boards supports other target voltages than 3.3V and switching of power (VCC) to the Extension connectors. The Extension kits voltage range can be read from the ID chip without applying power to the Extension kit, if the target voltage is within the valid voltage range of the Extension kit power will be switched on.