20.07.2015 Views

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

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> / <strong>62</strong> <strong>Group</strong>SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER(1) Timer modeIn this mode, the timer counts an internally generated count source. (See Table 1.17.1.) Figure 1.17.7shows the timer Ai mode register in timer mode.Table 1.17.1. Specifications of timer modeItemSpecificationCount sourcef1, f8, f32, fC32Count operation • Down count• When the timer underflows, it reloads the reload register contents before continuing countingDivide ratio 1/(n+1) n : Set valueCount start condition Count start flag is set (= 1)Count stop condition Count start flag is reset (= 0)Interrupt request generation timing When the timer underflowsTAiIN pin function Programmable I/O port or gate inputTAiOUT pin function Programmable I/O port or pulse outputRead from timer Count value can be read out by reading timer Ai registerWrite to timer• When counting stoppedWhen a value is written to timer Ai register, it is written to both reload register and counter• When counting in progressWhen a value is written to timer Ai register, it is written to only reload register(Transferred to counter at next reload time)Select function• Gate functionCounting can be started and stopped by the TAiIN pin’s input signal• Pulse output functionEach time the timer underflows, the TAiOUT pin’s polarity is reversedTimer Ai mode registerb7 b6 b5 b4 b3 b2 b1 b000 0Symbol Address When resetTAiMR(i=0 to 4) 039616 to 039A16 0016Bit symbolTMOD0TMOD1MR0MR1MR2MR3TCK0TCK1Bit nameOperation modeselect bitPulse output functionselect bitGate function select bitb1 b00 0 : Timer modeFunction0 : Pulse is not output(TAiOUT pin is a normal port pin)1 : Pulse is output (Note 1)(TAiOUT pin is a pulse output pin)b4 b30 (Must always be fixed to “0” in timer mode)Count source select bitFigure 1.17.7. Timer Ai mode register in timer mode0 X (Note 2): Gate function not available(TAiIN pin is a normal port pin)1 0 : Timer counts only when TAiIN pin isheld “L” (Note 3)1 1 : Timer counts only when TAiIN pin isheld “H” (Note 3)b7 b60 0 : f10 1 : f81 0 : f321 1 : fC32R WNote 1: The settings of the corresponding port register and port direction registerare invalid.Note 2: The bit can be “0” or “1”.Note 3: Set the corresponding port direction register to “0”.87

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

Saved successfully!

Ooh no, something went wrong!