Rev. 1.71 104 April 11, 2017 Rev. 1.71 105 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Programming Considerations
DuringmicrocontrolleroperationswheretheA/Dconverterisnotbeingused,theA/Dinternal
circuitrycanbeswitchedofftoreducepowerconsumption,byclearingtheENADCbitinthe
SADC0register.Whenthishappens,theinternalA/Dconvertercircuitswillnotconsumepower
irrespectiveofwhatanalogvoltageisappliedtotheirinputlines.IftheA/Dconverterinputlinesare
usedasnormalI/Os,thencaremustbetakenasiftheinputvoltageisnotatavalidlogiclevel,then
thismayleadtosomeincreaseinpowerconsumption.
A/D Transfer Function
Asthedevicescontaina12-bitA/Dconverter,itsfull-scaleconverteddigitisedvalueisequalto
FFFH.Sincethefull-scaleanaloginputvalueisequaltotheV
DD
orV
REF
voltage,thisgivesasingle
bitanaloginputvalueofV
DD
orV
REF
dividedby4096.
1LSB=(AV
DD
orV
REF
)/4096
TheA/DConverterinputvoltagevaluecanbecalculatedusingthefollowingequation:
A/Dinputvoltage=A/Doutputdigitalvalue×(AV
DD
orV
REF
)/4096
Thediagramshowstheidealtransferfunctionbetweentheanaloginputvalueandthedigitised
outputvaluefortheA/Dconverter.Exceptforthedigitisedzerovalue,thesubsequentdigitised
valueswillchangeatapoint0.5LSBbelowwheretheywouldchangewithouttheoffset,andthe
lastfullscaledigitisedvaluewillchangeatapoint1.5LSBbelowtheV
DD
orV
REF
level.
Ideal A/D Transfer Function