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.

Timer AMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERSelecting one-shot timer mode and functionsb70 0 1b01 0Timer Ai mode register (i=0 to 4) [Address 039616 to 039A16]TAiMR (i=0 to 4)Selection of one-shot timer modePulse output function select bit1 : Pulse is outputExternal trigger select bitWhen internal trigger is selected, this bit can be “1” or “0”Trigger select bit0 : When the one-shot start flag is set “1”0 (Must always be “0” in one-shot timer mode)Count source select bitb7 b60 0 : f10 1 : f81 0 : f321 1 : fC32b7b60 00 11 01 1Countsourcef1f8f32fC32Count source periodf(XIN) : 16MHZ f(XcIN) : 32.768kHZ62.5ns500ns2µs976.56µsClearing timer Ai interrupt request bitb70b0Timer Ai interrupt control register [Address 005516 to 005916]TAiIC (i=0 to 4)Interrupt request bitRefer to 'Precaution for Timer A (one shot timer mode)'Setting one-shot timer's time(b15)(b8)b7b0 b7b0Timer A0 register [Address 038716, 038616] TA0Timer A1 register [Address 038916, 038816] TA1Timer A2 register [Address 038B16, 038A16] TA2Timer A3 register [Address 038D16, 038C16]TA3Timer A4 register [Address 038F16, 038E16] TA4Can be set to 000116 to FFFF16Setting clock prescaler reset flag(This function is effective when fC32 is selected as the count source. Reset the prescaler for generating fC32by dividing the XCIN by 32.)b7b0Clock prescaler reset flag [Address 038116]CPSRFClock prescaler reset flag0 : No effect1 : Prescaler is reset (When read, the value is “0”)Setting count start flagb7b0Count start flag [Address 038016]TABSRTimer A0 count start flagTimer A1 count start flagTimer A2 count start flagTimer A3 count start flagTimer A4 count start flagSetting one-shot start flagb7b0One-shot start flag [Address 038216]ONSFTimer A0 one-shot start flagTimer A1 one-shot start flagTimer A2 one-shot start flagTimer A3 one-shot start flagTimer A4 one-shot start flagStart countFigure 2.2.21. Set-up procedure of one-shot mode301

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

Saved successfully!

Ooh no, something went wrong!