Our application requires a 5 channel system of which any, or all, of the PT100s may be required – cycling steps 11) through to 30) [see below]. Reference resistor = 4k7, Headroom resistor 499R, Excitation current = 500uA, Gain = 32, anti-aliasing networks etc. Comms checks show the Device ID = ‘0x17’.
For our experimentation:
- Channel 0 = flying lead PT100.
- Channel 1 = open.
- Channel 2 = onboard 68R resistor.
- Channel 3 = flying lead 100R resistor.
- Channel 4 = onboard 100R resistor.
A) If the full code sequence (below) is run, all five Channels produce ‘0x000000’ AD conversion results. At steps 8a) and 9a) both the Offset 0 and Gain 0 registers show ‘0x000000’.
Including/excluding steps 4b) and 10b) made no difference.
B) If the Full Scale and Zero Scale calibrations are skipped steps 4) to 7); Channel 0 reads the PT100 (or calculated as 100.3R if the flying lead 100R resistor is used = 0.3R offset), Channel 1 = ‘0x000000’, Channel 2 = ‘0xFFFFFF’, Channel 3 = ‘0xFFFFFF’ and Channel 4 = ‘0x000000’. Both the Offset 0 and Gain 0 registers show ‘0x800000’.
When the calibrations are skipped, whatever is written to the Offset Register, step 3f), is read back 8a); however, the Gain 0 register 9a) appears to hold the same value.
There must be something simple being omitted/assumed.
1. Reset AD7124-8: send 8x 0xFF
2. Wait 2000ms
3. Write Configuration:
a) 0b00011001 (Configuration Register 0): 0b00000001, 0b11100101.
Enable buffers, REFIN1(+)/REFIN1(-) and Gain 32.
b) 0b00100001 (Filter Register 0): 0b10010111, 0b00000000, 0b11000000.
Sinc4 & average blocking, single cycle conversion and 50SPS.
c) 0b00000111 (Error Enable Register): 0b00000000, 0b00000000, 0b01000000.
d) 0b00001001 (Channel Register 0): 0b00000001, 0b00000110.
Disable, Setup 0, AINP 8 and AINM 6.
e) 0b00000001 (ADC Control Register): 0b00000000, 0b01001000.
Continuous Read disabled, Internal Ref voltage disabled, Mid power mode, and Standby mode (to permit writing to Offset Register).
f) 0b00101001 (Offset Register): 0b10000000, 0b00000000, 0b00000000.
Default 0x800000.
4. Initiate Full Scale Calibration:
a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
Enable, Setup 0, AINP 4 and AINM 3.
b) (optional) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00000101.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
c) 0b00000001 (ADC Control): 0b00000000, 0b01011000.
Mid power mode and Internal Full Scale calibration.
5. Wait 1000ms and check RDY pin low.
6. Initiate Zero Scale Calibration:
a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
Enable, Setup 0, AINP 4 and AINM 3.
b) 0b00000001 (ADC Control): 0b00000000, 0b01010100.
Mid power mode and Internal Zero Scale calibration.
7. Wait 1000ms and check RDY pin low.
8. Read Offset Reg:
a) 0b01101001 (Offset 0). Read 3 bytes OffSet Register.
9. Read Gain Reg:
a) 0b01110001 (Gain 0). Read 3 bytes Gain Register.
10. Reset Configurations:
a) 0b00001101 (Channel 4): 0b00000000, 0b10000011.
Disable, Setup 0, AINP 4 and AINM 3.
b) (optional) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000101.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
c) 0b00000001 (ADC Control): 0b00000000, 0b11001000.
Full power mode and Standby mode.
11: Channel 0 single conversion:
a) 0b00001001 (Channel 0): 0b10000001, 0b00000110.
Enable, Setup 0, AINP 8 and AINM 6.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001001.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN9 at 500uA.
c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
Status enabled, Full power mode and Single Conversion.
12. Wait RDY pin low.
13. Read Channel 0 data:
a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 0).
14. Channel 0 Standby:
a) 0b00001001 (Channel 0): 0b00000001, 0b00000110.
Disable, Setup 0, AINP 8 and AINM 6.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001001.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
15: Channel 1 single conversion:
a) 0b00001010 (Channel 1): 0b10000001, 0b01001011.
Enable, Setup 0, AINP 10 and AINM 11.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001100.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN12 at 500uA.
c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
Status enabled, Full power mode and Single Conversion.
16. Wait RDY pin low.
17. Read Channel 1 data:
a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 1).
18. Channel 1 Standby:
a) 0b00001010 (Channel 1): 0b00000001, 0b01001011.
Disable, Setup 0, AINP 10 and AINM 11.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001100.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
19: Channel 2 single conversion:
a) 0b00001011 (Channel 2): 0b10000001, 0b10101110.
Enable, Setup 0, AINP 13 and AINM 14.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001111.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN15 at 500uA.
c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
Status enabled, Full power mode and Single Conversion.
20. Wait RDY pin low.
21. Read Channel 2 data:
a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 2).
22. Channel 2 Standby:
a) 0b00001011 (Channel 2): 0b00000001, 0b10101110.
Disable, Setup 0, AINP 13 and AINM 14.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001111.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
23: Channel 3 single conversion:
a) 0b00001100 (Channel 3): 0b10000000, 0b00010000.
Enable, Setup 0, AINP 1 and AINM 0.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 00000010.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN2 at 500uA.
c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
Status enabled, Full power mode and Single Conversion.
24. Wait RDY pin low.
25. Read Channel 3 data:
a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 3).
26. Channel 3 Standby:
a) 0b00001100 (Channel 3): 0b0000000, 0b00010000.
Disable, Setup 0, AINP 1 and AINM 0.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000010.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
27: Channel 4 single conversion:
a) 0b00001101 (Channel 4): 0b10000000, 0b10000011.
Enable, Setup 0, AINP 4 and AINM 3.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 00000101.
Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
Status enabled, Full power mode and Single Conversion.
28. Wait RDY pin low.
29. Read Channel 4 data:
a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 4).
30. Channel 4 Standby:
a) 0b00001101 (Channel 4): 0b0000000, 0b10000011.
Disable, Setup 0, AINP 4 and AINM 3.
b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000101.
Digital Output disabled, IOUT1 and IOUT0 excitation currents off.