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.

Counter content (hex)Timer AMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.2.3 Operation of Timer A (timer mode, gate function selected)In timer mode, choose functions from those listed in Table 2.2.2. Operations of the circled items aredescribed below. Figure 2.2.8 shows the operation timing, and Figure 2.2.9 shows the set-up procedure.Table 2.2.2. Choosed functionsItemCount sourcePulse output functionGate functionOOOSet-upInternal count source(f1 / f8 / f32 / fc32)No pulses outputPulses outputNo gate functionPerforms count only for the period in which the TAiIN pin is at “L” levelPerforms count only for the period in which the TAiIN pin is at “H” levelOperation(1) When the count start flag is set to “1” and the TAiIN pin inputs at “H” level, the counter performsa down count on the count source.(2) When the TAiIN pin inputs at “L” level, the counter holds its value and stops.(3) If an underflow occurs, the content of the reload register is reloaded and the count continues.At this time, the timer Ai interrupt request bit goes to “1”.(4) Setting the count start flag to “0” causes the counter to hold its value and to stop.Note• Make the pulse width of the signal input to the TAiIN pin not less than two cycles of the countsource.FFFF16nn = reload register content(1) Start count(3) Underflow(2) Stop count(4) Stop countStart count again.000016Set to “1” by softwareCleared to “0” bysoftwareTimeSet to “1” by softwareCount start flagTAiIN pininput signalTimer Ai interruptrequest bit“1”“0”“H”“L”“1”“0”Cleared to “0” when interrupt request is accepted, or cleared by softwareFigure 2.2.8. Operation timing of timer mode, gate function selected288

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

Saved successfully!

Ooh no, something went wrong!