21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A-D ConverterMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER(4) Repeat sweep mode 0In repeat sweep mode 0, the pins selected using the A-D sweep pin select bit are used for repeat sweepA-D conversion. Table 1.20.5 shows the specifications of repeat sweep mode 0. Figure 1.20.7 shows theA-D control register in repeat sweep mode 0.Table 1.20.5. Repeat sweep mode 0 specificationsItemSpecificationFunctionThe pins selected by the A-D sweep pin select bit are used for repeat sweep A-D conversionStart conditionWriting “1” to A-D conversion start flagStop conditionWriting “0” to A-D conversion start flagInterrupt request generation timing None generatedInput pinAN0 and AN1 (2 pins), AN0 to AN3 (4 pins), AN0 to AN5 (6 pins), or AN0 to AN7 (8 pins)Reading of result of A-D converter Read A-D register corresponding to selected pin (at any time)A-D control register 0 (Note)b7 b6 b5 b4 b3 b2 b1 b01 1Symbol Address When resetADCON0 03D616 00000XXX2Bit symbol Bit name FunctionCH0 Analog input pinselect bitInvalid in repeat sweep mode 0CH1CH2MD0MD1A-D operation modeselect bit 0b4 b31 1 : Repeat sweep mode 0R WTRG Trigger select bit 0 : Software trigger1 : ADTRG triggerADSTA-D conversion start flag 0 : A-D conversion disabled1 : A-D conversion startedCKS0 Frequency select bit 0 0 : fAD/4 is selected1 : fAD/2 is selectedNote: If the A-D control register is rewritten during A-D conversion, the conversion resultis indeterminate.A-D control register 1 (Note 1)b7 b6 b5 b4 b3 b2 b1 b010Symbol Address When resetADCON1 03D716 0016Bit symbolSCAN0SCAN1MD2BITSCKS1VCUTOPA0OPA1Bit nameA-D sweep pin select bitA-D operation modeselect bit 18/10-bit mode select bitFrequency select bit 1Vref connect bitExternal op-ampconnection modebit (Note 2)FunctionWhen single sweep and repeat sweep mode 0are selectedb1 b00 0 : AN0, AN1 (2 pins)0 1 : AN0 to AN3 (4 pins)1 0 : AN0 to AN5 (6 pins)1 1 : AN0 to AN7 (8 pins)0 : Any mode other than repeat sweep mode 10 : 8-bit mode1 : 10-bit mode0 : fAD/2 or fAD/4 is selected1 : fAD is selected1 : Vref connectedb7 b60 0 : ANEX0 and ANEX1 are not used0 1 : ANEX0 input is A-D converted1 0 : ANEX1 input is A-D converted1 1 : External op-amp connection modeNote 1: If the A-D control register is rewritten during A-D conversion, the conversion resultis indeterminate.Note 2: Neither “01” nor “10” can be selected with the external op-amp connection mode bit.R WFigure 1.20.7. A-D conversion register in repeat sweep mode 0160

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!