Chapter 16A/D Converter (ADC)XVI - 12 Operation16.3.2 Setup Procedure Initial setup of A/D conversion operationThe following flow chart shows the initial setup procedure of A/D conversion operation.Figure:16.3.2 Initial setup procedure of A/D conversion operationAfter initial setup, the A/D conversion is started, when the selected A/D conversion start factor occurs.The conversion completion can be confirmed by monitoring A/D conversion interrupt or the ANCTR2.ANST...When the conversion is restarted by changing the setting after the A/D conversion, set theANCTR0.ANLADE to "0" to change the setup after stopping an analog circuit.Note that operation is not guaranteed if the procedures above are not properly conducted.....After setting the ANCTR0.ANLADE to "1" and waiting for 12 conversion clocks, start A/D con-version...//Analog input pin setting//Analog pin function selectionANEN0.ANEN0 = 1PnDIR.PnDIRm = 0PnPLU.PnPLUm = 0PnODC.PnODCm = 0//A/D conversion clock, S/H time settingANCTR0.ANCK2-0 = "any"ANCTR0.ANSH1-0 = "any"ANCTR0.ANLADE = 0//A/D resistor ladder ONANCTR0.ANLADE = 1STARTEND//Channel selectionANCTR1.ANCHS2-0 = "ANn"//A/D converion star factor selectionANCTR2.ANSTSEL1-0 = "any"