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 A ApplicationsMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERSetting timer A0Selecting timer mode and functionsb70 00 0 0 0b00 0Timer A0 mode register [Address 039616]TA0MRSelection of timer modePulse output function select bit0 : Pulse is not output (TA0OUT pin is a normal port pin)Gate function select bitb4 b30 0 : Gate function not available (TA0IN pin is a normal port pin)0 (Must always be “0” in timer mode)Count source select bitb7 b60 0 : f1b7 b6 Countsource0 00 11 01 1f1f8f32fC32Count source periodf(XIN) : 16MHZ f(XcIN) : 32.768kHZ62.5ns500ns2µs976.56µsSetting divide ratio(b15)b73E16(b8)b0 b77F16b0Timer A0 register [Address 038716, 038616]TA0Setting timer A1Selecting event counter mode and each functionb70 0 0 0 0 0b00 1Timer A1 mode register [Address 039716]TA1MRSelection of event counter modePulse output function select bit]0 : Pulse is not output (TA1OUT pin is a normal port pin)Count polarity select bitUp/down switching cause select bit0 : Up/down flag content0 (Must always be “0” in event counter mode)Count operation type select bit0 : Reload typeFix to “0” when counting timer overflow flagContinued to the next pageFigure 3.1.3. Set-up procedure of long-period timers (1)458

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

Saved successfully!

Ooh no, something went wrong!