January2011DocID16983Rev21/38AN3137ApplicationnoteA/DconverteronSTM8LdevicesdescriptionandprecisionimprovementtechniquesIntroductionThisapplicationnotedescribesthe12-bitA/DconverterembeddedintheSTM8Lfamilymicrocontrollers.ItoffersaselectionofhardwareandsoftwaremethodsforimprovingtheprecisionofthisA/Dconverter.Itisdividedintothefollowingsections:■ThefirstsectionexplainstheinternaldesignprincipleoftheSTM8LADC.■ThesecondsectiondescribestheADCoperationfromtheprogrammer’spointofview.■ThefinalsectionliststhemaintypesoferrorsthatoccurinA/Dconvertersandtheirsources.Itdescribessomehardwareandsoftwaremethodsforminimizingtheseerrors.Firmwareexamples(sourcecodes)areprovidedwiththisapplicationnoteshowinghowtoimplementSTM8LADCroutinesforminimizingmeasurementerrors.