CHAPTER 7 16-BIT TIMER/EVENT COUNTER 0
User’s Manual U16896EJ2V0UD
241
7.4.2 Square wave output operation
When 16-bit timer/event counter 01 operates as an interval timer (refer to
7.4.1
), a square wave can be output from
the TO01 pin by setting the TOC01 register to 03H.
When the TMC01.TMC013 and TMC01.TMC012 bits are set to 11 (count clear & start mode entered upon a match
between the TM01 register and the CR010 register), the counting operation is started in synchronization with the
count clock.
When the value of the TM01 register later matches the value of the CR010 register, the TM01 register is cleared to
0000H, an interrupt signal (INTTM010) is generated, and output of the TO01 pin is inverted. This TO01 pin output
that is inverted at fixed intervals enables TO01 to output a square wave.
Remarks 1.
For the alternate-function pin settings, refer to
Table 4-12 Settings When Port Pins Are Used for
Alternate Functions
.
2.
For enabling the INTTM010 interrupt, refer to
CHAPTER 17 INTERRUPT/EXCEPTION PROCESSING
FUNCTION
.
Figure 7-6. Block Diagram of Square Wave Output Operation
16-bit counter (TM01)
CR010 register
Operable bits
TMC013, TMC012
Count clock
Clear
Match signal
INTTM010 signal
Output
controller
TO01 pin
Figure 7-7. Basic Timing Example of Square Wave Output Operation
TM01 register
0000H
Operable bits
(TMC013, TMC012)
Compare register
(CR010)
TO01 pin output
Compare match interrupt
(INTTM010)
N
11
00
N
N
N
N
Interval
(N + 1)
Interval
(N + 1)
Interval
(N + 1)
Interval
(N + 1)
Содержание V850ES/KE1+
Страница 2: ...User s Manual U16896EJ2V0UD 2 MEMO...