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.

Converted analog input pinConverted analog input pinConverted analog input pinConverted analog input pinA-D ConverterMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.7.9 Operation of A-D Converter (in repeat sweep mode 1)In repeat sweep 1 mode, choose functions from those listed in Table 2.7.9. Operations of the circled items aredescribed below. Figure 2.7.19 shows ANi pin's sweep sequence, Figure 2.7.20 shows timing chart, and Figure2.7.21 shows the set-up procedure.Table 2.7.9. Choosed functionsItemSet-upItemSet-upOperation clock φADODivided-by-4 fAD / dividedby-2fAD / fADResolutionO 8-bit / 10-bitAnalog input pin An0 (1 pin) / AN0 and AN1 (2O pins) / AN0 to AN2 (3 pins) /AN0 to AN3 (4 pins)Trigger for startingA-D conversionExpanded analoginput pinSample & HoldOOSoftware triggerTrigger by ADTRGNot usedExternal ope-ampconnection modeNot activatedOActivatedOperation(1) Setting the A-D conversion start flag to “1” causes the A-D converter to start the conversion on voltageinput to the AN0 pin.(2) After the A-D conversion on voltage input to the AN0 pin is completed, the content of the successivecomparison register (conversion result) is transmitted to A-D register 0.(3) Every time the A-D converter carries out A-D conversion on a selected analog input pin, the A-D convertercarries out A-D conversion on only one unselected pin, and then the A-D converter carries out A-D conversionfrom the AN0 pin again. (See Figure 2.7.19.) The conversion result is transmitted to A-D register ievery time conversion on a pin is completed. The A-D conversion interrupt request bit does not go to “1”.(4) The A-D converter continues operating until software goes the A-D conversion start flag to “0”.When AN0 is selectedWhen AN0, AN1 are selectedWhen AN0 to AN2 are selectedWhen AN0 to AN3 are selectedTimeTimeTimeTime0 0 0 0 0 0 0 0 0 0.11 .22 .345670 0 0 0 0 0 01 1 1 1 1 1 123456720...0 0 0 0 0 0 01 1 1 1 1 1 .2 2 2 2 2 2 ..3345670 0 0 0 0 01 1 1 1 1 .2 2 2 2 2 .3 3 3 3 3.45674Figure 2.7.19. ANi pin's sweep sequence in repeat sweep mode(2) Conversion result istransfered to A-Dconversion register 0(1) Start AN0 pin conversion8-bit resolution :28 φAD cycles10-bit resolution :33 φAD cycles8-bit resolution :28 φAD cycles10-bit resolution :33 φAD cycles(3) Consecutive conversion8-bit resolution :28 φAD cycles10-bit resolution :33 φAD cycles8-bit resolution :28 φAD cycles10-bit resolution :33 φAD cycles(4) A-Dconversionis completeφADSet to “1” by softwareCleared to “0” by softwareA-Dconversionstart flag“1”“0”A-D register 0ResultResultA-D register 1ResultA-D register 2ResultNote: When φAD frequency is less than 1MHz, sample and hold function cannot be selected.Conversion rate per analog input pin is 49 φAD cycles for 8-bit resolution and 59 φAD cycles for 10-bit resolution.Figure 2.7.20. Operation timing of repeat sweep 1 mode402

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

Saved successfully!

Ooh no, something went wrong!