21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A-D ConverterMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER(3) Single sweep modeIn single sweep mode, the pins selected using the A-D sweep pin select bit are used for one-by-one A-Dconversion. Table 1.20.4 shows the specifications of single sweep mode. Figure 1.20.6 shows the A-Dcontrol register in single sweep mode.Table 1.20.4. Single sweep mode specificationsItemSpecificationFunctionThe pins selected by the A-D sweep pin select bit are used for one-by-one A-D conversionStart conditionWriting “1” to A-D converter start flagStop condition• End of A-D conversion (A-D conversion start flag changes to “0”, exceptwhen external trigger is selected)• Writing “0” to A-D conversion start flagInterrupt request generation timing End of A-D conversionInput 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 pinA-D control register 0 (Note)b7 b6 b5 b4 b3 b2 b1 b01 0Symbol Address When resetADCON0 03D616 00000XXX2Bit symbol Bit name FunctionCH0 Analog input pinselect bitInvalid in single sweep modeCH1CH2MD0MD1TRGADSTCKS0A-D operation modeselect bit 0Trigger select bitA-D conversion start flagFrequency select bit 0b4 b31 0 : Single sweep mode0 : Software trigger1 : ADTRG trigger0 : A-D conversion disabled1 : A-D conversion started0 : fAD/4 is selected1 : fAD/2 is selectedNote: If the A-D control register is rewritten during A-D conversion, the conversion resultis indeterminate.R WA-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)Figure 1.20.6. A-D conversion register in single sweep modeFunctionWhen 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 modeR WNote 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.159

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

Saved successfully!

Ooh no, something went wrong!