MC97F2664April 11, 2014 Ver. 1.4 21711.13 12-Bit A/D Converter11.13.1 OverviewThe analog-to-digital converter (A/D) allows conversion of an analog input signal to corresponding 12-bit digitalvalue. The A/D module has fifteen analog inputs. The output of the multiplexer is the input into the converterwhich generates the result through successive approximation. The A/D module has four registers which are theA/D converter control high register (ADCCRH), A/D converter control low register (ADCCRL), A/D converter datahigh register (ADCDRH), and A/D converter data low register (ADCDRL). The channels to be converted areselected by setting ADSEL[3:0]. To execute A/D conversion, TRIG[1:0] bits should be set to ‘xx’. The registerADCDRH and ADCDRL contains the results of the A/D conversion. When the conversion is completed, the resultis loaded into the ADCDRH and ADCDRL, the A/D conversion status bit AFLAG is set to ‘1’, and the A/D interruptis set. During A/D conversion, AFLAG bit is read as ‘0’.11.13.2 Conversion TimingThe A/D conversion process requires 4 steps (4 clock edges) to convert each bit and 10 clocks to set up A/Dconversion. Therefore, total of 58 clocks are required to complete a 12-bit conversion: When fxx/8 is selected forconversion clock with a 12MHz fxx clock frequency, one clock cycle is 0.66 μs. Each bit conversion requires 4clocks, the conversion rate is calculated as follows:4 clocks/bit × 12 bits + set-up time = 58 clocks,58 clock × 0.66 μs = 38.28 μs at 1.5 MHz (12 MHz/8)NOTE) The A/D converter needs at least 20 μs for conversion time. So you must set the conversion time morethan 20 μs.