
VII - 31
Chapter 7
16-bit Timers
16-bit Timer Pulse Output
At TMnOC1 = x'0000' and x'0001', the timer pulse output have the same waveform.
Regardless of whether the binary counter is stopped or operated, the timer output is "L",
when the TMnCL flag of the TMnMD1 register is set to "1".
TM7BC counts up from x'0000'. If TM7BC reaches the set value of the TM7OC1 register and
TM7BC is cleared to x'0000', the signal of the TM7IO output is inverted and TM7BC counts up from
x'0000', again.
(6)
Set 1/2 cycle of the timer pulse output
to the timer 7 preset register 1(TM7PR1).
To set 100 kHz by dividing 20 MHz, set as
follows:
200 - 1 = 199 (x'C7')
The same value is loaded to the timer 7
compare register 1 (TM7OC1) and the timer
7 binary counter (TM7BC) is initialized to
x'0000'.
(7)
Set the TN7CL flag of the TM7MD1 register to
"0" to enable the timer pulse output.
(8)
Set the TM7EN flag of the TM7MD1 register to
"1" to start timer 7.
Setup Procedure
(6)
Set the timer pulse output cycle.
TM7PR1 (X'3F75', X'3F74')=x'00C7'
(7)
Release the reset of the timer pulse
output.
TM7MD1 (x'3F78')
bp5
: TM7CL
= 0
(8)
Start the timer operation.
TM7MD1 (x'3F78')
bp4
: TM7EN
= 1
Description
To output the timer pulse output from the TM7O large current pin, set the P5OMD1 flag of the port
5 output mode register (P5OMD) to "1" at the setup example (2), to set the P51 pin as a special
function pin and set the P5DIR1 flag of the port 5 direction control register to "1" to set output mode.