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 MICROCOMPUTER2.2.8 Operation of timer A (2-phase pulse signal process in event counter mode,multiply-by-4 mode selected)In processing 2-phase pulse signals in event counter mode, choose functions from those listed in Table2.2.7. Operations of the circled items are described below. Figure 2.2.18 shows the operation timing, andFigure 2.2.19 shows the set-up procedure.Table 2.2.7. Choosed functionsItemSet-upItemSet-upCount operation typeOReload typeFree run typeProcessing 2 phasepulses (Note)ONormal processing4-multiplication processingNote: Timer A3 alone can be selected. Timer A2 is solely used for normal processes, and timer A4 is solely used for 4-multiplication processes.Operation(1) Setting the count start flag to “1” causes the counter to count effective edges of the count source.(2) Even if an underflow occurs, the content of the reload register is not reloaded, but the countcontinues. At this time, the interrupt request bit goes to “1”.(3) Even if an overflow occurs, the content of the reload register is not reloaded, but the countcontinues. At this time, the interrupt request bit goes to “1”.Note• The up count or down count conditions are as follows:Table 2.2.8. The up count or down count conditionsInput signal to theTAiOUT pinInput signal to theTAiIN pinInput signal to theTAiOUT pinInput signal to theTAiIN pinUp count“H” level“L” levelRisingFallingDowncount“H” level“L” levelFallingRisingRising“L” levelRising“H” levelFalling“H” levelFalling“L” level“H”TAiOUT“L”“H”TAiIN“L”(1) Start countCounter content (hex) Input pulseFFFF16“1”Count start flag“0”Timer Ai interrupt “1”request bit“0”000016Set to “1” by softwareTime(2) Underflow (3) OverflowCleared to “0” when interrupt request is accepted, or cleared by softwareFigure 2.2.18. Operation timing of 2-phase pulse signal process in event counter mode, multiply-by-4 mode selected298

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

Saved successfully!

Ooh no, something went wrong!