| Electronic Components Datasheet Search |
|
DS1852 Datasheet(PDF) 24 Page - Dallas Semiconductor |
|
|
|||||||||||||||||||||||||||||
DS1852 Datasheet(HTML) 24 Page - Dallas Semiconductor |
|
24 / 25 page ![]() DS1852 24 of 25 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; |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |