DS1852
25 of 26
begin
bestTrim := trim;
if (Bit > 11) then
Begin
trim := trim - lshft(1,trimBit);
end;
end;
end;
(* The upper 4 bits of bestTrim contains the answer for the course adjustment.*)
(* It is the smallest value that allows full scale trim with the lower 12 bits*)
(* zero out the lower 12 bits of bestTrim *)
trim := land(bestTrim,61440(*F000h*)); (*land() is logical AND function*)
(*Use SAR approach to trim resolution on VAD scale bits 11-0*)
for Bit := 11 downto -1 do (* must go 1 bit too far so that zero is
possible solution *)
begin
if (Bit > 0) then
begin
trim := trim + lshft(1,Bit);
end;
writeTrimValue(trim);
waitForNewConversion;
Dec_out := readVoltage;
delta := Dec_out - Dec_in;
if ( abs(delta) <= abs(bestDelta) ) then
begin
bestTrim := trim;
bestDelta := delta;
end;
if ( delta > 0 ) then
begin
if (Bit > 0) then
Begin
trim := trim - lshft(1,trimBit);
end;
end;
end;
(* bestTrim now contains the trim that gives the lowest delta*)
ProgramTrim(bestTrim);
end;
DS1852
26 of 26
MECHANICAL DRAWING

DS1852B-000

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Data Acquisition ADCs/DACs - Specialized Optical Transceiver Diagnostic Monitor
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet