SLOA247C July 2017 – March 2019 RF430FRL152H , RF430FRL153H , RF430FRL154H
The following example configuration samples a light sensor on the RF430FRL152HEVM. This example is meant to be run on the TRF7970AEVM PC Control GUI. To run on another ISO/IEC 15693 reader/writer, remove the 18 on the start of the packet. The rest of the packet can be used on that reader. For guidance on how to send a write and read single block command using the TRF7970AVEM Control GUI, see Section 3.5.
1 => 0x00 - Reference-ADC1 Configuration Register (not used, so don't care here)
2 => 0x00 - Thermistor-ADC2 Sensor Configuration Register (not used, so don't care here)
3 => 0xYY - ADC0 Sensor Configuration Register (the light sensor)
8 bits (LSB first):
0 to 1 => 00 (PGA gain of 1) (other options are 2, 4, and 8)
2 => 1 (CIC filter) (the other option is Moving Average filter)
3 to 5 => 101 (1024 CIC decimation ratio with 14-bit accuracy)
6 => 0 (Use virtual ground to improve accuracy; this setting must be consistent for all sensors)
7 => 0 (Reserved)
Final value: 0010 1100 or 0x2C
4 => 0x00 [Internal Sensor Configuration register (not used, so don't care here)]
5 => 0x00 [Initial Delay Period Setup register (not used, so don't care here)
6 => 0x00 [JTAG Enable Password Register (JTAG disabled)]
7 to 8 => 0x00 0x00 [Initial Delay Period register (not used, so don't care here)]
Final value: 00 00 2C 00 00 00 00 00
Final packet to send with the Test tab: 1802210200002C0000000000
1 => 0x01 (Start bit is set, after this is written this starts the sampling process)
2 => 0xYY (Status byte)
3 => 0x04 (ADC0 sensor selected)
4 => 0x00 (Frequency register, this is don't care since only one sample or pass is done)
5 => 0x01 (Only one pass is needed)
6 => 0x01 (No averaging selected)
7 => 0x00 (No options selected)
8 => 0x00 (No options selected)
Final value: 01 00 04 00 01 01 00 00
Final packet to send with the Test tab: 180221000100040001010000
Because one sensor was selected and at 1024 decimation ratio, sampling requires approximately 1 second to complete. Reading block 0 and checking the status register to see if the result completed is another way to determine if the sampling process has completed. This example simply reads block 0x09 to see the results:
Reading block 0x09:
Enter in Test tab Read Single Block for Block 0x09: 18022009
Response: [009024FFFFFFFFFFFF] (Light sample result = 2490h, the rest are don't care)
To repeat the measurement, enter block 0 string again (covering the green light sensor):
180221000100040001010000
Result (wait 1 second):
Enter in Test tab Read Single Block for Block 0x09: 18022009
Response: [009013FFFFFFFFFFFF] (Light sensor result = 1390h, the rest are don't care)