
CHAPTER 6 16-BIT TIMER 20
User’s Manual U11919EJ4V0UD
88
(1)
16-bit compare register 20 (CR20)
This register compares the value set to CR20 with the count value of 16-bit timer counter 20 (TM20), and
when they match, generates an interrupt request (INTTM2).
CR20 is set with a 16-bit memory manipulation instruction. Values from 0000H to FFFFH can be set.
RESET input sets this register to FFFFH.
Cautions 1. This register is manipulated with a 16-bit memory manipulation instruction; however,
an 8-bit memory manipulation instruction can be used. When manipulated with an 8-
bit memory manipulation instruction, the accessing method should be direct
addressing. This register can be accessed only in short direct addressing mode when
a 16-bit memory manipulation instruction is used.
2. When rewriting CR20 during a count operation, set CR20 to interrupt disabled using
interrupt mask flag register 1 (MK1) beforehand. Also, set the timer output data to
inversion disabled using 16-bit timer mode control register 20 (TMC20).
If CR20 is rewritten with interrupts enabled, an interrupt request may be issued
immediately.
(2)
16-bit timer counter 20 (TM20)
This is a 16-bit register that counts count pulses.
TM20 is read with a 16-bit memory manipulation instruction.
This register is in free-running mode during count clock input.
RESET input clears this register to 0000H, after which it enters free-running mode again.
Cautions 1. The count value after releasing stop becomes undefined because the count operation
is executed during the oscillation stabilization time.
2. This register is manipulated with a 16-bit memory manipulation instruction; however,
an 8-bit memory manipulation instruction can be used. When manipulated with an 8-
bit memory manipulation instruction, the accessing method should be direct
addressing. This register can be accessed only in short direct addressing mode when
a 16-bit memory manipulation instruction is used.
3. When manipulated with an 8-bit memory manipulation instruction, readout should be
performed in order from lower byte to higher byte and must be in pairs.
(3)
16-bit capture register 20 (TCP20)
This is a 16-bit register that captures the contents of 16-bit timer counter 20 (TM20).
TCP20 is set with a 16-bit memory manipulation instruction.
RESET input makes this register undefined.
Caution
This register is manipulated with a 16-bit memory manipulation instruction; however, an
8-bit memory manipulation instruction can be used.
When manipulated with an 8-bit
memory manipulation instruction, the accessing method should be direct addressing.
This register can be accessed only in short direct addressing mode when a 16-bit memory
manipulation instruction is used.
(4)
16-bit counter read buffer
This buffer latches the counter value and retains the count value of 16-bit timer counter 20 (TM20).