322
CHAPTER 13 REMOTE CONTROL GENERATOR (6-BIT PPG)
13.1 Overview of Remote Control Generator
The remote control generator is a 6-bit binary counter that can select one of four
clocks as its count clock. Both the cycle of the output waveform and its "H" state pulse
width can be set, which allows the circuit to be used as a 6-bit PPG. The circuit uses
the same output pin as the buzzer output.
s Remote Control Generation Function
Generates frequencies for use by a remote control unit, and outputs the signal at the RCO
pin.
The cycle and "H" state pulse width of the output waveform can be set separately.
The count clock can be selected from four different internal clocks.
The frequencies can generate with a cycle among 2 and 26 times the count clock cycle.
Table 13.1-1 "Output Cycles and "H" Pulse Width Ranges" lists the available range of "H" state
pulse widths.
tinst: instruction cycle (affected by clock mode, etc.)
*: Can also output a steady "H" state (100% duty cycle).
r Calculation example for the remote control generator cycle an "H" width (when a 0.5 tinst
clock is selected for count clock cycle)
Assume a main clock source oscillation (FCH) of 4.2 MHz, and a 0.5 tinst clock selected for count
clock cycle. Also assume main clock mode, and the highest clock speed selected from the
system clock control register (SYCC: SCS = CS1 = CS0 = 1). (This makes the instruction cycle
time 4/FCH.) Then, for the indicated comparison values, the output waveform cycle and "H"
state pulse width can be calculated as follows:
Table 13.1-1 Output Cycles and "H" Pulse Width Ranges
Internal count clock cycle
Output cycle
Output "H" pulse width*
0.5 tinst
1 tinst to 32 tinst
0.5 tinst to 31.5 tinst
1 tinst
2 tinst to 63 tinst
1 tinst to 62 tinst
8 tinst
16 tinst to 504 tinst
8 tinst to 496 tinst
32 tinst
64 tinst to 2016 tinst
32 tinst to 1984 tinst
Cycle comparison value = 011110B (30 clock cycles)
Pulse width comparison value = 001010B (10 clock cycles)
Cycle
= (cycle comparison value + 1) × count clock cycle
= "011110B" (30+1 clock cycles) × 0.5 × 4/FCH
= 31 × 0.475
s
= 14.725
s