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 BMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERSelecting timer mode and functionsb7b00 0Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]TBiMR (i=0 to 5)Selection of timer modeInvalid in timer modeCan be “0” or “1”Fixed to “0” in timer mode ( i = 0, 3)In an attempt to write to this bit, write “0” (i = 1, 2, 4, 5)Invalid in timer modeCount 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 divide ratio(b15)b7(b8)b0 b7b0Timer B0 register [Address 039116, 039016] TB0Timer B1 register [Address 039316, 039216] TB1Timer B2 register [Address 039516, 039416] TB2Timer B3 register [Address 035116, 035016] TB3Timer B4 register [Address 035316, 035216] TB4Timer B5 register [Address 035516, 035416] TB5Can be set to 000016 to FFFF16Setting 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 flagb7Timer B3,4,5 count startb0 flag[Address 034016]TBSRTimer B3 count start flagTimer B4 count start flagTimer B5 count start flagStart countFigure 2.3.5. Set-up procedure of timer mode317

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

Saved successfully!

Ooh no, something went wrong!