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 MICROCOMPUTER2.2.14 Precautions for Timer A (event counter mode)(1) To clear reset, the count start flag is set to “0”. Set a value in the timer Ai register, then set theflag to “1”.(2) Reading the timer Ai register while a count is in progress allows reading, with arbitrary timing,the value of the counter. Reading the timer Ai register with the reload timing shown in Figure2.2.29 gets “FFFF16” by underflow or “000016” by overflow. Reading the timer Ai register aftersetting a value in the timer Ai register with a count halted but before the counter starts countinggets a proper value.(3) Please note the standards for the differences between the 2 pulses used in the 2-phase pulsesignals input signals to the TAiIN pin and TAiOUT pin (i = 2, 3, 4), as shown in Figure 2.2.30.(4) When free run type is selected, if count is stopped, set a value in the timer Ai register again.(1) Down countCounter value(Hex.)Reload2 1 0 n n – 1(2) Up countCounter value(Hex.)ReloadFFFD FFFE FFFF n n + 1Read value(Hex.)2 1 0 FFFFn – 1Read value(Hex.)FFFD FFFE FFFF 0000 n + 1n = reload register contentTimen = reload register contentTimeFigure 2.2.29. Reading timer Ai registerTA2INTA3INTA4INT1Vcc = 5V, f(XIN) = 16MHzT1(Min.)800nsT2, T3(Min.)200nsTA2OUTTA3OUTTA4OUTT2T3Vcc = 3V, f(XIN) = 10MHz, one-waitT1(Min.)T2, T3(Min.)2µs 500nsFigure 2.2.30. Standard of 2-phase pulses309

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

Saved successfully!

Ooh no, something went wrong!