CHAPTER 6 PERIPHERAL HARDWARE FUNCTION
160 Users Manual U10676EJ3V0UM
6.4.5 Operation in carrier generator mode (CG mode)
In the PWM mode, timer counter channels 1 and 2 operate in combination to implement an 8-bit carrier generator
operation.
When using CG mode, use it in combination with channel 1 and channel 2 of the timer counter.
Timer counter channel 1 generates a remote controller signal.
Timer counter channel 2 generates a carrier clock.
(1) Register setting
In the CG mode, the following eight registers are used.
Timer counter mode registers TM1 and TM2
Timer counter control register TC2Note
Timer counter count registers T1 and T2
Timer counter modulo registers TMOD1 and TMOD2
Timer counter high-level period setting modulo register TMOD2H
Note Timer counter channel 1 uses the timer counter output enable flag (TOE1).
(a) Timer counter mode registers (TM1 and TM2)
In the CG mode, set TM1 and TM2 as shown in Figure 6-44 (for the formats of TM1 and TM2, refer
to Figure 6-27 Format of Timer Counter Mode Register (Channel 1) and Figure 6-28 Format of
Timer Counter Mode Register (Channel 2)).
TM1 and TM2 are manipulated by an 8-bit manipulation instruction. Bit 3 of TM1 and TM2 is timer start
command bit which can be manipulated in 1-bit units and is automatically cleared to 0 when the timer
starts operating.
TM1 and TM2 are also cleared to 00H when the internal reset signal is asserted.