JAJSQK0D August 2013 – June 2026 ADS1120
PRODUCTION DATA
以下に示されている疑似コード シーケンスには、ADS1120 からの後続の読み取り値を連続変換モードで取り込むように、デバイスと、ADC に接続するマイコンを設定するために必要な手順が含まれています。専用 DRDY ピンは、新しい変換データが利用可能であることを示すために使用されます。デフォルトの構成レジスタ設定は、ゲイン = 16、連続変換モード、50Hz および 60Hz 同時除去に変更されています。
Power-up;
Delay to allow power supplies to settle and power-up reset to complete (minimum of 50µs);
Configure the SPI of the microcontroller to SPI mode 1 (CPOL = 0, CPHA = 1);
If the CS pin is not tied low permanently, configure the microcontroller GPIO connected to CS as an output;
Configure the microcontroller GPIO connected to the DRDY pin as a falling edge triggered interrupt input;
Set CS to the device low;
Delay for a minimum of td(CSSC);
Send the RESET command (06h) to make sure the device is properly reset after power-up;
Delay for a minimum of 50µs + 32 × t(CLK);
Write the respective register configuration with the WREG command (43h, 08h, 04h, 10h, and 00h);
As an optional sanity check, read back all configuration registers with the RREG command (23h);
Send the START/SYNC command (08h) to start converting in continuous conversion mode;
Delay for a minimum of td(SCCS);
Clear CS to high (resets the serial interface);
Loop
{
Wait for DRDY to transition low;
Take CS low;
Delay for a minimum of td(CSSC);
Send 16 SCLK rising edges to read out conversion data on DOUT/DRDY;
Delay for a minimum of td(SCCS);
Clear CS to high;
}
Take CS low;
Delay for a minimum of td(CSSC);
Send the POWERDOWN command (02h) to stop conversions and put the device in power-down mode;
Delay for a minimum of td(SCCS);
Clear CS to high;
測定を行う前、または PGA のゲインを変更するときは、オフセット キャリブレーションを実行します。デバイスの内部オフセットは、たとえば入力を中電圧 (MUX[3:0] = 1110b) に短絡することで測定できます。次に、マイコンは入力を短絡した状態でデバイスから複数の読み取り値を取得し、平均値をマイコン メモリに保存します。センサ信号を測定するとき、マイコンは各デバイスの読み取り値から保存されたオフセット値を減算して、オフセット補償された結果を得ます。オフセットの値は正または負の値になります。