English
Language : 

M38002M4 Datasheet, PDF (64/173 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.2 Timer
Timer XY mode register (Address : 2316)
b7
b0
TM
1 001
Timer X (Address : 2516)
b7
b0
TX
63
Prescaler X (Address : 2416)
b7
b0
PREX
0
Timer X operating mode bits : Pulse output mode
CNTR0 active edge switch bit : Output from the “H” level
Timer X count stop bit : Count stop
Set to “0” at starting to count.
Set “division ratio – 1”
Fig. 2.2.15 Setting of related registers [Piezoelectric buzzer output]
Control procedure :
Figure 2.2.16 shows a control procedure.
RESET
Initialization
P5 (Address : 0A16), bit4 1
P5D (Address : 0B16) XXX1XXXX2
ICON1 (Address : 3E16), bit4 0
TM (Address : 2316) XXXX10012
TX (Address : 2516)
64 – 1
PREX (Address : 2416)
1–1
q X : This bit is not used in this application.
Set it to “0” or “1.” It’s value can be disregarded.
q Timer X interrupts : Disabled
q The CNTR0 output is stopped at this point (stop
outputting a piezoelectric buzzer).
q Set “division ratio – 1” to the Prescaler X and
Timer X.
Main processing
Output unit
A piezoelectric buzzer
is requested?
q The piezoelectric buzzer request occured in the
Y main processing is processed in the output unit.
N
TM (Address : 2316), bit3
TX (Address : 2516)
1
64 –1
TM (Address : 2316 ), bit3
0
During stopping outputting a piezoelectric buzzer
During outputting a piezoelectric buzzer
Fig. 2.2.16 Control procedure [Piezoelectric buzzer output]
2-16
3800 GROUP USER’S MANUAL