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.

Timer AMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERTable 1.17.3. Timer specifications in event counter mode (when processing two-phase pulse signal with timers A2, A3, and A4)ItemSpecificationCount source• Two-phase pulse signals input to TAiIN or TAiOUT pinCount operation • Up count or down count can be selected by two-phase pulse signal• When the timer overflows or underflows, the reload register content isreloaded and the timer starts over again (Note)Divide ratio1/ (FFFF16 - n + 1) for up count1/ (n + 1) for down count n : Set valueCount start condition Count start flag is set (= 1)Count stop condition Count start flag is reset (= 0)Interrupt request generation timing Timer overflows or underflowsTAiIN pin function Two-phase pulse inputTAiOUT pin function Two-phase pulse inputRead from timer Count value can be read out by reading timer A2, A3, or A4 registerWrite to timer• When counting stoppedWhen a value is written to timer A2, A3, or A4 register, it is written to bothreload register and counter• When counting in progressWhen a value is written to timer A2, A3, or A4 register, it is written to onlyreload register. (Transferred to counter at next reload time.)Select function• Normal processing operationThe timer counts up rising edges or counts down falling edges on the TAiINpin when input signal on the TAiOUT pin is “H”TAiOUTTAiIN(i=2,3)UpcountUpcountUpcountDowncountDowncountDowncount• Multiply-by-4 processing operationIf the phase relationship is such that the TAiIN pin goes “H” when the inputsignal on the TAiOUT pin is “H”, the timer counts up rising and falling edgeson the TAiOUT and TAiIN pins. If the phase relationship is such that theTAiIN pin goes “L” when the input signal on the TAiOUT pin is “H”, the timercounts down rising and falling edges on the TAiOUT and TAiIN pins.TAiOUTCount up all edgesCount down all edgesTAiIN(i=3,4)Count up all edgesNote: This does not apply when the free-run function is selected.Count down all edges90

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

Saved successfully!

Ooh no, something went wrong!