Setup and Operation
8
SLDU019B – December 2015 – Revised March 2016
Copyright © 2015–2016, Texas Instruments Incorporated
PGA450Q1EVM-S User's Guide and TIDA-00151 UART Demo Instructional
The description of the TX data packet is as follows:
•
00: is the break field
•
55: is the synchronization field
•
01: 0 is the command and 1 is the sensor address. Ensure that the sensor address matches what
was programmed in the EEPROM address 0x07 from the previous steps.
•
00: is the checksum field; however, this data is discarded, so the user may enter any value here.
Step 12. Click the RX button to display the response of the sensor.
The description of the RX data packet is as follows:
•
12: is dummy byte 1 and has no special meaning.
•
34: is dummy byte 2 and has no special meaning.
•
B9: is the checksum from byte 1 and byte 2.
The function that calculates the checksum is described as follows:
provides a checksum calculation of four bytes shown. If the frame has four data bytes of the
protected identifier and three data bytes, the calculation is the same. The data = 0x4A, 0x55, 0x93, 0xE5.
Table 4. Example of Checksum Calculation
Action
Hex
Carry
D7
D6
D5
D4
D3
D2
D1
D0
0x4A
0x4A
0
1
0
0
1
0
1
0
+0x55 = Add Carry
0x9F
0x9F
0
1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
+0x93 = Add Carry
0x132
0x33
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
0
1
+0xE5 = Add Carry
0x118
0x19
1
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
1
Invert
0xE6
1
1
1
0
0
1
1
0
0x19 + 0.xE6 =
0xFF
1
1
1
1
1
1
1
1
The resulting sum is 0x19. Inversion yields the final result of: checksum = 0xE6. The receiving node can
check the consistency of the received frame by using the same addition mechanism. When the received
checksum (0xE6) is added to the intermediate result (0x19) the sum is 0xFF.
The previously described TX command is called
command0 – Sensor Check Command
. If the sensor is
address 0x01 and the user attempts to communicate with a sensor using a different address, sensor 0x01
gives no response. In the following TX example shown in
, no response was received as
displayed in the RX box because, in this example, command0 was sent to sensor address 0x02.
Figure 7. No Response in the RX Box