Rev.2.00 Oct 16, 2006 page 303 of 354
REJ09B0340-0200
M30245 Group
3. Timer A Applications
3.3 Buzzer Output
Overview
Specifications
Operation
Figure 3.3.1. Operation timing of buzzer output
“0”
“1”
“0”
“1”
Timer A0
overflow timing
Count start flag
Pulse output
function select bit
P7
0
output
“0”
“1”
High-impedance
High-impedance
(1) Start count
(2) Buzzer output ON
(3) Buzzer output OFF
The timer mode is used to make the buzzer ring. Figure 3.3.1 shows the operation timing, and
Figure 3.3.2 shows the set-up procedure.
Use the following peripheral function:
• The pulse-outputting function in timer mode of timer A.
(1) Sound a 2-kHz buzz beep by use of timer A0.
(2) Effect pull-up in the relevant port by use of a pull-up resistor. When the buzzer is off, set the
port high-impedance, and stabilize the potential resulting from pulling up.
(3) Connect a 16-MHz oscillator to X
IN
.
(1) The microcomputer begins performing a count on timer A0. Timer A0 has disabled interrupts.
(2) The microcomputer begins pulse output by setting the pulse output function select bit to
“Pulse output effected”. P7
0
changes into TA0
OUT
pin and outputs 2-kHz pulses.
(3) The microcomputer stops outputting pulses by setting the pulse output function select bit to
“Pulse output not effected”. P7
0
goes to an input pin, and the output from the pin becomes
high-impedance.
Summary of Contents for M16C FAMILY
Page 12: ...Chapter 1 Hardware...
Page 13: ...See M30245 group datasheet...
Page 14: ...Chapter 2 Peripheral Functions Usage...
Page 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Page 340: ...Chapter 4 External Buses...
Page 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 362: ...Chapter 5 Standard Characteristics...