303CHAPTER 15 A/D CONVERTER15.4.3 A/D converter operating modeOne analog input channel is selected from among ANI0 to ANI7 with the A/D converter input select register (ADIS)and A/D converter mode register (ADM) and A/D conversion is executed.The following two ways are available to start A/D conversion.• Hardware start: Conversion is started by trigger input (INTP3).• Software start: Conversion is started by setting ADM.The A/D conversion result is stored in the A/D conversion result register (ADCR) and the interrupt request signal(INTAD) is simultaneously generated.(1) A/D conversion by hardware startWhen bit 6 (TRG) and bit 7 (CS) of the A/D converter mode register (ADM) are set to 1, the A/D conversionstandby state is set. When the external trigger signal (INTP3) is input, the A/D conversion starts on thevoltage applied to the analog input pins specified with bits 1 to 3 (ADM1 to ADM3) of ADM.Upon termination of the A/D conversion, the conversion result is stored in the A/D conversion result register(ADCR) and the interrupt request signal (INTAD) is generated. After one A/D conversion operation is startedand terminated, another operation is not started until a new external trigger signal is input.If data with CS set to 1 is written to ADM again during A/D conversion, the converter suspends its A/Dconversion operation and waits for a new external trigger signal to be input. When the external trigger inputsignal is reinput, A/D conversion is carried out from the beginning.If data with CS set to 0 is written to ADM during A/D conversion, the A/D conversion operation stopsimmediately.Figure 15-7. A/D Conversion by Hardware StartRemark n = 0, 1, ... , 7m = 0, 1, ... , 7ADM RewriteCS = 1, TRG = 1StandbyState ANInINTP3A /D ConversionADCRINTADANIn ANIn ANIn ANIm ANImANIn ANInStandbyState StandbyStateADM RewriteCS = 1, TRG = 1ANIm ANIm ANIm