Hi, we recently started to use this AD Converter and almost everything works fine, we can setup it as we want and we can correctly read the converted data, the problem is that we can't run a calibration even if we followed everything that is wrote into the datasheet.
Our startup sequence is (taken from our code):
START
{
Set_ADC(u8_device_i, ENABLE_ADC); // Device CS goes DOWN
Send_byte_command(adc_commands.u8_reset_cmd); // Send RESET COMMAND
Set_ADC(u8_device_i, DISABLE_ADC); // Device CS goes HIGH
WAITING_FOR(1); // Wait for 1 ms
Set_ADC(u8_device_i, ENABLE_ADC); // Device CS goes DOWN
Write_all_registers(); // Send WREG COMMAND
Set_ADC(u8_device_i, DISABLE_ADC); // Device CS goes HIGH
WAITING_FOR(1); // Wait for 1 ms
START_ADC = 1; // START PIN GOES HIGH
WAITING_FOR(1); // Wait for 1 ms
START_ADC = 0; // START PIN GOES LOW
Set_ADC(u8_device_i, ENABLE_ADC); // Device CS goes DOWN
Send_byte_command(adc_commands.u8_sfocal_cmd); // Send SFOCAL COMMAND
Set_ADC(u8_device_i, DISABLE_ADC); // Device CS goes HIGH
WAITING_FOR(1); // Wait for 1 ms
Read_all_registers(u8_device_i); // Send RREG COMMAND
}
END
Our register setup is:
0x01, // Register 00h: [ID]
0x00, // Register 01h: [STATUS]
0x12, // Register 02h: [Input Multiplexer]
0x0B, // Register 03h: [Gain Setting]
0x34, // Register 04h: [Data Rate]
0x02, // Register 05h: [Reference Control]
0x07, // Register 06h: [Excitation Current Register 1]
0x30, // Register 07h: [Excitation Current Register 2]
0x00, // Register 08h: [Sensor Biasing]
0x10, // Register 09h: [System Control]
0x00, // Register 0Ah: [Offset Calibration Register 1] LSB
0x00, // Register 0Bh: [Offset Calibration Register 2]
0x00, // Register 0Ch: [Offset Calibration Register 3] MSB
0x00, // Register 0Dh: [Gain Calibration Register 1] LSB
0x00, // Register 0Eh: [Gain Calibration Register 2]
0x40, // Register 0Fh: [Gain Calibration Register 3] MSB
0x00, // Register 10h: [GPIO Data]
0x00, // Register 11h: [GPIO Configuration]
I tried to read the registers before and after calibration (SFOCAL) command and nothing happend, I also tried with the other calibration commands (SYOCAL and SYGCAL) but nothing.
NOTE: I tried to manually set SYS_MON[2:0] = 001b and then run the SFOCAL command, but still nothing.
Where am I wrong? Please help and if more information is needed please ask.
Thanks in advance for your support.