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 BMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERSelecting pulse period / pulse width measurement mode and functionsb710b01 0Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]TBiMR (i=0 to 5)Selection of pulse period / pulse width measurement modeMeasurement mode select bitb3 b21 0 : Pulse width measurement (Interval between measurement pulse falling edge torising edge, and between rising edge to falling edge)Fixed to “0” in pulse period/pulse width measurement mode (i = 0, 3)In an attempt to write to this bit, write “0” (i = 1, 2, 4, 5)Timer Bi overflow flag0 : Timer did not overflow1 : Timer has overflowedCount source select bitb7 b60 0 : f10 1 : f81 0 : f321 1 : fC32b7 b60 00 11 01 1Countsourcef1f8f32fC32Count source periodf(XIN) : 16MHZ f(XcIN) : 32.768kHZ62.5ns500ns2µs976.56µsSetting clock prescaler reset flag(This function is effective when fC32 is selected as the count source. Reset the prescaler for generating fC32 bydividing the XCIN by 32.)b7b0Clock prescaler reset flag [Address 038116]CPSRFClock prescaler reset flag0 : No effect1 : Prescaler is reset (When read, the value is “0”)Setting count start flagb7b0Count start flag[Address 038016]TABSRTimer B0 count start flagTimer B1 count start flagTimer B2 count start flagb7b0Timer B3,4,5 count startflag[Address 034016]TBSRTimer B3 count start flagTimer B4 count start flagTimer B5 count start flagStart countClearing overflow flagb70b0Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]TBiMR (i=0 to 5)Timer Bi overflow flag0 : Timer did not overflowFigure 2.3.11. Set-up procedure of pulse width measurement mode323

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

Saved successfully!

Ooh no, something went wrong!