図1から分かるように、DS1863/DS1865のMON端子にはシングルエンドの電圧を印加します。アナログドメイン内で、その電圧がプログラマブルなスケールブロックに供給されます。このスケールブロックによって、希望するLSBまたはフルスケールの電圧が得られるようなMONチャネルのキャリブレーションが可能になっています。フルスケール電圧は、希望するLSB x 2n (nはビット数)です。さらに、スケールブロックが存在することで、小さな入力信号を内部で増幅し、ADCの利用度を最大化することが可能になっています。この手順については、後でさらに詳しく説明します。
/* Assume that the null input is 0.5V. */
/* Assume that the desired LSB of the lowest weighted bit is 50µV */
Max Reading = 65535 x 50e-6 /* 3.27675 */
CNT1 = 0.5 / 50e-6 /* 10000 */
CNT2 = 0.90 x FS / 50e-6 /* 58981.5 */
/* The null input is 0.5V and the 90% of FS input is 0.9*3.27675 = 2.949075V. */
Set the trim-offset-register to zero
Set Right Shift register to zero (typically zero. See Right Shifting section above..)
Scale_result = 0h
Clamp = FFF8h/2Right_Shift_Register
For n = 15 down to 0,
Begin
scale_result = scale_result + 2n
Force the 90% FS input (2.949075V)
Meas2 = read the digital result from the part
If Meas2 >= Clamp then
scale_result = scale_result – 2n
Else
Begin
Force the null input (0.5V)
Meas1 = read the digital result from the part
If (Meas2 – Meas1) > (CNT2 – CNT1) then
scale_result = scale_result – 2n
End
End
Set the Scale register to scale_result