Datasheet

Jon Waddington
63
In this example, the first two bytes are 0x00 and 0x12, meaning that there are 18 bytes
of information to follow, excluding the checksum.
The 3
rd
byte is the API identifier. 0x92 notifies the receiver that sampled data is being
transmitted.
The next 8 bytes contain the 64 bit address of the remote XBEE, 0x00, 0x13, 0xA2,
0x00, 0x40, 0x62, 0x4D and 0xD8.
Bytes 12 and 13 are the 16 bit network address. In this case they are 0x68 and 0xD6.
Byte 14 indicates that the packet was acknowledged and byte 15 specifies how many
samples are included in the packet. In this case, just one sample is transmitted.
Bytes 16 and 17 specify the digital channel mask which are both set to 0x00 as there are
no digital samples.
The analogue channel mask is indicated by byte 18, which is set to 0x01. This means
that the XBEE’s input pin 1 is the analogue, sampled data.
Bytes 19 and 20 hold the sample data. In this case, the values are 0x02 and 0x73. The
sampled voltage from the temperature sensor is then found using the following formula.
( )
= × 1.2 = × 1.2 = 0.7355 (4.4.2 - 1)
This is then converted to a temperature using the following formula
=
( . × )
×
= 23.55° (4.4.2 - 2)
The equation used in the information system has been rearranged to avoid performing
floating point math. This equation is shown below.
=
× 1200
1023
− 500
10
= 23.55°
The checksum, 0x3B, is calculated by summing all the bytes after the length bytes, then
taking the lowest byte and subtracting it from 0xFF. To verify the checksum, the XBEE
datasheet recommends adding all the bytes after the length bytes, including the
checksum. If the checksum is correct, the lowest byte of this will equal 0xFF.










