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(1) One-shot modeIn one-shot mode, the pin selected using the analog input pin select bit is used for one-shot A-D conversion.Table 1.20.2 shows the specifications of one-shot mode. Figure 1.20.4 shows the A-D control registerin one-shot mode.Table 1.20.2. One-shot mode specificationsItemSpecificationFunctionThe pin selected by the analog input pin select bit is used for one A-D conversionStart conditionWriting “1” to A-D conversion 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 pinOne of AN0 to AN7, as selectedReading of result of A-D converter Read A-D register corresponding to selected pinA-D control register 0 (Note 1)b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset0 0ADCON0 03D616 00000XXX2Bit symbol Bit name FunctionCH0CH1CH2MD0MD1TRGAnalog input pin selectbitA-D operation modeselect bit 0Trigger select bitb2 b1 b00 0 0 : AN0 is selected0 0 1 : AN1 is selected0 1 0 : AN2 is selected0 1 1 : AN3 is selected1 0 0 : AN4 is selected1 0 1 : AN5 is selected1 1 0 : AN6 is selected1 1 1 : AN7 is selected (Note 2)b4 b30 0 : One-shot mode (Note 2)0 : Software trigger1 : ADTRG triggerR W ADST A-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 1: If the A-D control register is rewritten during A-D conversion, the conversionresult is indeterminate.Note 2: When changing A-D operation mode, set analog input pin again.A-D control register 1 (Note)b7 b6 b5 b4 b3 b2 b1 b010Symbol Address When resetADCON1 03D716 0016Bit symbol Bit nameSCAN0 A-D sweep pinselect bitSCAN1Figure 1.20.4. A-D conversion register in one-shot modeMD2FunctionInvalid in one-shot modeBITS 8/10-bit mode select bit 0 : 8-bit mode1 : 10-bit modeCKS1VCUTOPA0OPA1A-D operation modeselect bit 1Frequency select bit1Vref connect bitExternal op-ampconnection mode bit0 : Any mode other than repeat sweepmode 10 : 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: If the A-D control register is rewritten during A-D conversion, the conversionresult is indeterminate.R W157

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

Saved successfully!

Ooh no, something went wrong!