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 A ApplicationsMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTERInitialization of timer A0b7b00 0 0 0 0 0 0 0Timer A0 mode registerTA0MR [Address 039616 ]Selection 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 available0 (Must always be “0” in timer mode)Count source select bitb7 b60 0 : f1b7 b60 00 11 01 1Countsourcef1f8f32fC32Count source periodf(XIN) : 16MHZ f(XcIN) : 32.768kHZ62.5ns500ns2µs976.56µsb15 b8 b7 b00F169F16b7b0Timer A0 registerTA0 [Address 038716, 038616]b7b01Count start flag [Address 038016]TABSRTimer A0 count start flag1 : Starts countingInitialization of port P7 direction registerb7b00Port P7 direction register [Address 03EF16]PD7Port P70 direction register0 : Input modeBuzzer ONb71b0Timer A0 mode register [Address 039616 ]TA0MRPulse output function select bit1 : Pulse is output (Port P70 is TA0OUT output pin)Buzzer OFFb70b0Timer A0 mode register [Address 039616 ]TA0MRPulse output function select bit0 : Pulse is not outputFigure 3.4.2. Set-up procedure of buzzer output469

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

Saved successfully!

Ooh no, something went wrong!