Other Parts Discussed in Thread: ADS114S08, LMP90100
Hi,
I'm trying to do a system calibration on my LMP90080, following the procedures described on specifications document, page 26.
It seems that the description is incomplete, there is no mention about how to prepare the calibration process, no information on preliminary requirements.
I'm trying to calibrate CH0, than immediately CH1. The process sometime succeeds, but I have no control on it.
Did anyone try a system calibration?
Below are some code sequences that I'm using:
// CALIBRATION PREPARATION
// Reset LMP
SPI_Send(0x10);
SPI_Send(0x00);
SPI_Send(0x00);
SPI_Send(0xC3);
Delay(1000);
// Set channel CH0 configuration
SPI_Send(0x10);
SPI_Send(0x02);
SPI_Send(0x01);
// 26.83 SPS, GAIN=1, no buffer in path
SPI_Send(0x41);
// Set channel CH1 configuration
SPI_Send(0x10);
SPI_Send(0x02);
SPI_Send(0x03);
// 26.83 SPS, GAIN=1, no buffer in path
SPI_Send(0x41);
// Set clock
SPI_Send(0x10);
SPI_Send(0x01);
SPI_Send(0x02);
// Internal clock
SPI_Send(0x20);
// CH0 SYSTEM CALIBRATION (CH1 SYSTEM CALIBRATION SEQUENCE IS THE SAME)
SPI_Send(0x10);
SPI_Send(0x01);
do {
data = SPI_Send(0x8E) & 0x2;
} while(data != 0x0);
// Set channel scan mode
SPI_Send(0x10);
SPI_Send(0x01);
SPI_Send(0x0F);
SPI_Send(0x00);
// ZERO CALIBRATION
//------------------
// Set channel CH0 to VIN7(GND)
SPI_Send(0x10);
SPI_Send(0x02);
SPI_Send(0x00);
// VINP:VIN7, VINN:VIN7(GND)
SPI_Send(0x3F);
Delay(100);
// Set SCALCN to Offset Coefficient Determination mode
SPI_Send(0x10);
SPI_Send(0x01);
SPI_Send(0x07);
SPI_Send(0x01);
// Wait calibration end
do {
data = SPI_Send(0x87);
} while(data != 0x0);
// SCALE CALIBRATION
//------------------
// Set channel CH0 to VIN6
SPI_Send(0x10);
SPI_Send(0x02);
SPI_Send(0x00);
// VINP:VIN6, VINN:VIN7(GND)
SPI_Send(0x37);
// Enable IB1 source current
SPI_Send(0x10);
SPI_Send(0x01);
SPI_Send(0x02);
// 1000uA current -> expect 1.0V read out
SPI_Send(0x2A);
// Put 1.0V value to CH0_SCAL_GAIN (0x67A5)
SPI_Send(0x10);
SPI_Send(0x03);
SPI_Send(0x03);
//SPI_SendData(0x67);
SPI_Send(0x7F);
SPI_Send(0x04);
//SPI_SendData(0xA5);
SPI_Send(0x67);
Delay(100);
// Set SCALCN to Gain Coefficient Determination mode
SPI_Send(0x10);
SPI_Send(0x01);
SPI_Send(0x07);
SPI_Send(0x02);
// Wait calibration end
do {
data = SPI_Send(0x87);
} while(data != 0x0);
Another this is related to the expected value of 1.0V on the ADC entry. The calculated value for gain calibration was 0x67A5, but the desired result was obtain by using instead 0x7F67.
Please advice!
Thanks,
Cristian