Operation Of 8-Bit Timer H1; Operation As Interval Timer/Square-Wave Output - NEC 78K0S/KU1+ User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KU1+:
Table of Contents

Advertisement

(2) Port mode register 2 (PM2) and port mode control register 2 (PMC2)
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.
Address: FF22H
After reset: FFH
Symbol
7
PM2
1
PM2n
0
Output mode (output buffer on)
1
Input mode (output buffer off)
Address: FF84H
After reset: 00H
Symbol
7
PMC2
0
PMC2n
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.
CHAPTER 7 8-BIT TIMER H1
Figure 7-5. Format of Port Mode Register 2 (PM2)
R/W
6
5
4
1
1
1
P2n pin I/O mode selection (n = 0 to 3)
Figure 7-6. Format of Port Mode Control Register 2 (PMC2)
R/W
6
5
4
0
0
0
Specification of operation mode (n = 0 to 3)
User's Manual U18172EJ2V0UD
3
2
1
PM23
PM22
PM21
3
2
1
PMC23
PMC22
PMC21
0
PM20
0
PMC20
127

Advertisement

Table of Contents
loading

Table of Contents