Datasheet
CHAPTER 7 8-BIT TIMER H1
User’s Manual U18172EJ3V0UD
136
(2) Port mode register 2 (PM2) and port mode control register 2 (PMC2)
Note
When using the P20/TOH1/TI000/ANI0 pin for timer output, clear PM20, the output latch of P20, and PMC20 to 0.
PM2 and PMC2 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets PM2 to FFH, and clears PMC2 to 00H.
Note
μ
PD78F920x only
Figure 7-5. Format of Port Mode Register 2 (PM2)
Address: FF22H After reset: FFH R/W
Symbol 7 6 5 4 3 2 1 0
PM2 1 1 1 1 PM23 PM22 PM21 PM20
PM2n P2n pin I/O mode selection (n = 0 to 3)
0 Output mode (output buffer on)
1 Input mode (output buffer off)
Figure 7-6. Format of Port Mode Control Register 2 (PMC2) (
μ
PD78F920x Only)
Address: FF84H After reset: 00H R/W
Symbol 7 6 5 4 3 2 1 0
PMC2 0 0 0 0 PMC23 PMC22 PMC21 PMC20
PMC2n Specification of operation mode (n = 0 to 3)
0 Port/Alternate-function (except A/D converter) mode
1 A/D converter mode
7.4 Operation of 8-Bit Timer H1
7.4.1 Operation as interval timer/square-wave output
When 8-bit timer counter H1 and compare register 01 (CMP01) match, an interrupt request signal (INTTMH1) is
generated and 8-bit timer counter H1 is cleared to 00H.
Compare register 11 (CMP11) is not used in interval timer mode. Since a match of 8-bit timer counter H1 and the
CMP11 register is not detected even if the CMP11 register is set, timer output is not affected.
By setting bit 0 (TOEN1) of timer H mode register 1 (TMHMD1) to 1, a square wave of any frequency (duty = 50%)
is output from TOH1.
<R>