User's Guide
- 40 of 42 ā
neo.
cortec
.
4.6 Payload Package format
When using the applications that generate data on the module, and not through the
UART interface, the Payload package is structured in different ways depending on the
specific application:
4.6.1 GPIO
Field
PreId Pin Changed Pin State Counter ADC1 ADC2 ADC3 ADC4
Length
1 byte 1 byte 1 byte 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes
PreId: The byte configured as part of the setting
Pin Changed: A byte where each bit corresponds to a pin (MSB = P7, LSB = P0), and
indicates if the pin has changed state during the sample period. It is trigged by a falling
edge. A 1 means that the pin has changed state, and 0 means no change (or that the pin
has changed from Low to High).
Pin State: A byte where each bit corresponds to a pin (MSB = P7, LSB = P0), and
indicates the state of the particular pin when the payload package was generated. A 1
means that the pin is High, and a 0 means the pin is Low.
Counter: Number of falling edge transitions on the pin selected as Counter during the
sample interval (10s to 24h).
ADCx: A 2s complement value, being either 7,9,10 or 12 bits depending on the
configuration. The value is aligned towards MSB of the ADCx bytes. For example a 12bit
ADC reading will look like this:
ADC
BYTES
Byte 0 Byte 1
msb lsb msb lsb
ADC
Bits
msb - - - - - - - - - - lsb X X X X
āXā means donāt care.
4.6.1.1 Internal Temperature Sensor
If the internal temperature sensor is used, the conversion from ADC value to
Temperature should be done according to this formula: