
W741C240
Publication Release Date: May 1999
- 9 -
Revision A1
the contents of the auto-reload buffer will be loaded into the TM1 down counter, Timer 1 starts to
down count, and the event flag 7 is reset (EVF.7 = 0). When the timer decrements to FFH, it will
generate an underflow (EVF.7 = 1) and be auto-reloaded with the specified data, after which it will
continue to count down. An interrupt is executed if the interrupt enable flag 7 has been set to 1 (IEF.7
= 1), and the hold state is terminated if the hold mode release enable flag 7 is set to 1 (HEF.7 = 1).
The specified frequency of Timer 1 can be delivered to the MFP output pin by programming bit 2 of
MR1. Bit 3 of MR1 can be used to make Timer 1 stop or start counting.
If the Timer 1 clock input is F
T, then
:
Desired Timer 1 interval = (preset value +1) / F
T
Desired frequency for MFP output pin = F
T
÷
(preset value + 1)
÷
2 (Hz)
Preset value: Decimal number of Timer 1 preset value, and
F
OSC
: Clock oscillation frequency
Auto-reload buffer
8 bits
MR1.3 = 1
Underflow
signal
EVF.7
MFP
MFP signal
MR1.2
output pin
8-bit Binary
Down Counter
(Timer 1)
2
circuit
Reset
Reset
Disable
Enable
Fosc/64
Fosc
MR1.0
S
R
Q
1. Reset
2. INT 7 accept
3. CLR EVF, #80H
4. Set MR1.3 to 1
T
F
1. MR1.3 = 0
4
4
MOV TM1H, R
MOV TM1L, R
Set MR1.3 to 1
Figure 5. Organization of Timer 1
For example, when F
T
equals 32768 Hz, depending on the preset value of TM1, the MFP pin will
output a single tone signal in the tone frequency range from 64 Hz to 16384 Hz. The relation between
the tone frequency and the preset value of TM1 is shown in the table below.