
123
CHAPTER 6 APPLICATIONS OF 8-BIT TIMER/EVENT COUNTER
CHAPTER 6 APPLICATIONS OF 8-BIT TIMER/EVENT COUNTER
The 8-bit timer/event counter of the 78K/0 series has the following functions:
Interval timer
External event counter
Square wave output
PWM output (
μ
PD780024, 780024Y, 780034, 780034Y, 780924, and 780964 subseries only)
Two channels or three channels of 8-bit timers/event counters are provided and these timers/event counters can
be used as a 16-bit timer/event counter when connected in cascade.
The 8-bit timers/event counters are set by the following registers:
<
μ
PD78002, 78002Y, 78014, 78014Y, 78018F, 78018FY, 78014H subseries,
μ
PD780001>
Timer clock select register 1 (TCL1)
8-bit timer mode control register (TMC1)
8-bit timer output control register (TOC1)
Port mode register 3 (PM3)
Port 3 (P3)
<
μ
PD780024, 780024Y, 780034, 780034Y subseries>
Timer clock select register 50, 51 (TCL50, TCL51)
8-bit timer mode control register 50, 51 (TMC50, TMC51)
Port mode register (PM7)
<
μ
PD780924, 780964 subseries>
Timer clock select register 50, 51, 52 (TCL50, TCL51, TCL52)
8-bit timer mode control register 50, 51, 52 (TMC50, TMC51, TMC52)
Caution The format of the registers provided on the
μ
PD780024, 780024Y, 780034, 780034Y, 780924, and
780964 subseries differs from the format of the registers used in the program examples in this
chapter. When using a program example in this chapter with any of the
μ
PD780024, 780024Y,
780034, 780034Y, 780924, and 780964 subseries, change the setting of the registers according
to the registers of the microcontroller used.