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 MICROCOMPUTERSelecting Sample and holdb7b01A-D control register 2 [Address 03D416]ADCON2A-D conversion method select bit1 : With sample and holdSetting A-D control register 0 and A-D control register 1b70 0 1 1b0A-D control register 0[Address 03D616] ADCON0b70 0 1 0b0A-D control register 1 [Address 03D716]ADCON1Invalid in repeat sweep mode 0Repeat sweep mode 0 is selected(Note)Trigger select bit0 : Software triggerA-D conversion start flag0 : A-D conversion disabledFrequency select bit 00 : fAD/4 is selected1 : fAD/2 is selectedA-D sweep pin select bit (Note)b1 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)A-D operation mode select bit 1 (Note)0 (Must always be “0” in repeat sweep mode 0)8/10-bit mode select bit0 : 8-bit mode1 : 10-bit modeFrequency select bit 10 : fAD/2 or fAD/4 is selected1 : fAD is selectedVref connect bit1 : Vref connectedNote: Rewrite to analog input pin select bit after changing A-D operation mode.External op-amp connection mode bitb7 b60 0 : ANEX0 and ANEX1 are not usedSetting A-D conversion start flagb71b0A-D control register 0 [Address 03D616]ADCON0A-D conversion start flag1 : A-D conversion startedRepeatedly carries out A-D conversion on pinsselected through the A-D sweep pin select bit.Start A-D conversionTransmitting conversion result to A-D register ib7 b0(b15)b7(b8)b0A-D register 2 [Address 03C516, 03C416] AD2A-D register 3 [Address 03C716, 03C616] AD3A-D register 0 [Address 03C116, 03C016] AD0A-D register 1 [Address 03C316, 03C216] AD1A-D register 4 [Address 03C916, 03C816] AD4A-D register 5 [Address 03CB16, 03CA16] AD5A-D register 6 [Address 03CD16, 03CC16] AD6A-D register 7 [Address 03CF16, 03CE16] AD7Eight low-order bits of A-D conversion resultDuring 10-bit modeTwo high-order bits of A-D conversion resultDuring 8-bit modeWhen read, the content is indeterminateSetting A-D conversion start flagb70b0A-D control register 0 [Address 03D616]ADCON0A-D conversion start flag0 : A-D conversion disabledStop A-D conversionFigure 2.7.18. Set-up procedure of repeat sweep 0 mode401

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

Saved successfully!

Ooh no, something went wrong!