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.

Counter content (hex)Timer AMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.2.4 Operation of Timer A (timer mode, pulse output function selected)In timer mode, choose functions from those listed in Table 2.2.3. Operations of the circled items aredescribed below. Figure 2.2.10 shows the operation timing, and Figure 2.2.11 shows the set-up procedure.Table 2.2.3. Choosed functionsItemSet-upCount sourcePulse output functionGate functionOOOInternal 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) Setting the count start flag to “1” causes the counter to perform a down count on the countsource.(2) 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”. Also, the output polarity of theTAiOUT pin reverses.(3) Setting the count start flag to “0” causes the counter to hold its value and to stop. Also, theTAiOUT pin outputs an “L” level.FFFF16n = reload register content(2) Underflow(1) Start count(3) Stop countnStart count again000016Set to “1” by softwareCleared to “0” bysoftwareSet to “1” by softwareTimeCount start flag“1”“0”Pulse output fromTAiOUT pin“H”“L”Cleared to “0” when interrupt request is accepted, or cleared by softwareTimer Ai interruptrequest bit“1”“0”Figure 2.2.10. Operation timing of timer mode, pulse output function selected290

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

Saved successfully!

Ooh no, something went wrong!