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 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 0 0b0A-D control register 0 [Address 03D616]ADCON0b710b0A-D control register 1 [Address 03D716]ADCON1Analog input pin select bit (Note)b2 b1 b00 0 0 : AN0 is selected(ANEX0)0 0 1 : AN1 is selected(ANEX1)Invalid in one-shot modeA-D operation mode select bit 1 (Note)0 (Must always be “0” in one-shot mode)One-shot mode is selected (Note)Trigger select bit0 : Software trigger8/10-bit mode select bit0 : 8-bit mode1 : 10-bit modeA-D conversion start flag0 : A-D conversion disabledFrequency select bit 00 : fAD/4 is selected1 : fAD/2 is selectedFrequency 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 1 : ANEX0 input is A-D converted1 0 : ANEX1 input is A-D convertedSetting A-D conversion start flagb71b0A-D control register 0 [Address 03D616]ADCON0A-D conversion start flag1 : A-D conversion startedStart A-D conversionStop A-D conversionReading conversion result(b15)b7(b8)b0 b7b0A-D register 0 [Address 03C116, 03C016] AD0A-D register 1 [Address 03C316, 03C216] AD1Eight 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 indeterminateFigure 2.7.10. Set-up procedure of one-shot mode, with expanded analog input pin selected393

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

Saved successfully!

Ooh no, something went wrong!