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 event counter mode and functionsb7000b00 1Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]TBiMR (i=0 to 5)Selection of event counter modeCount polarity select bitb3 b20 0 : Counts external signal falling edgesFixed to “0” in event counter mode ( i = 0, 3)In an attempt to write to this bit, write “0” (i = 1, 2, 4, 5)Invalid in event counter modeEvent clock select0 : Input from TBiIN pin (Note)Note: Set the corresponding port direction register to “0”.Setting divide ratio(b15)(b8)b7b0 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 FFFF16 (n)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 startb0flag[Address 034016]TBSRTimer B3 count start flagTimer B4 count start flagTimer B5 count start flagStart countFigure 2.3.7. Set-up procedure of event counter mode319

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

Saved successfully!

Ooh no, something went wrong!