Hello guys!
I am wondering what i am doing wrong with the CRC funcionality of the ADS7138.
The following register configuration works properly and configure the ADC on an autonomous mode:
ADC Register | Value |
0x05 | 0x00 |
0x01 | 0x02 |
0x12 | 0xFF |
0x17 | 0x01 |
0x14 | 0xFF |
0x04 | 0x35 |
0x01 | 0x30 |
0x10 | 0x11 |
0x03 | 0x07 |
with the previous register configuration, I execute a read operation and I get digital hex. code according to the input voltage fixed on the analog input of the ADC.
However, when I enable the CRC module on the ADC. It means set to "1" the bit 6 of the GENERAL__CFG register (0x01). See below the new table with the configuration of the ADC with the CRC enabled.
ADC register | Value |
0x05 | 0x00 |
0x01 | 0x42 |
0x12 | 0xFF |
0x17 | 0x01 |
0x14 | 0xFF |
0x04 | 0x35 |
0x01 | 0x70 |
0x10 | 0x11 |
0x03 | 0x07 |
With the previous configuration, when I execute the same read opertion as before the results is 0x00 for all the read values....Furthermore the ADC is entering in a blocking mode and to make it working again, I need to make a power on cycle of the PCB.
1) Am I configuring the ADC on the right way? I have also tested to append the CRC byte for every configuration command and it is also not working. See below two examples:
a. Script line to configure one register of the ADC without appending the CRC at the end: "WIB 2E 0812 FF"
Where:
- 0x2E is the device address
- 0x08 is the opcode
- 0x12 is the internal register
- 0xFF is the value to write in the register.
b. Script line to configure one ADC register appending the CRC calculation at the end: "WIB 2E 0812 FF
D5"
- 0x2E is the device address
- 0x08 is the opcode
- 0x12 is the internal register
- 0xFF is the value to write in the register.
- 0x
D5: is the CRC value of the command
Both of cases are not working and the result when I execute the read operation is always 0x00. The script line to execute a read operation on the ADC is: "RIB 2E 10A6 1"
Where:
-0x2E: is the device address.
-0x10: is the opcode
-0xA6: is the internal register where is the value to read.
-0x1: is the number of bytes to read. In this case just one byte.
2) How do you think is performing the ADC the read operation with the CRC module enabled? Is it also appended the CRC byte at the end of the read value? I have aslo tried to read two consecutive bytes (RIB 2E 10A6 1) and the result was also 0x00....
3) Anyone has experience with the I2C CRC? I think I am missing something related with the working principle...
Thanks in advance and greetings