323
13.1 Overview of Remote Control Generator
If the "H" pulse width setting is equal to or greater than the cycle setting, the output will be a
steady "H" state.
r Calculation example for the remote control generator cycle an "H" width (when a 1/8/32
tinst clock is selected for count clock cycle)
Assume a main clock source oscillation (FCH) of 4.2 MHz, and a 1 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:
If the "H" pulse width setting is equal to or greater than the cycle setting, the output will be a
steady "H" state.
s 6-bit PPG Function (when a 0.5 tinst clock selected for count clock cycle)
Because the cycle and "H" pulse width of its output waveform can be set separately, the remote
control generator can be used as a 6-bit PPG. The duty ratio is from 1.56% to 100%. The valid
range of "H" pulse width comparison settings, however, is from "0" to the cycle comparison
setting. This means that the lower the cycle comparison setting (the shorter the cycle of the
output waveform), the lower the resolution (the larger the minimum duty ratio step size).
For a cycle comparison setting of "1", for example, the possible "H" pulse width comparison
settings would be "0" and "1" which would result in a resolution of 1/2. The duty ratios for these
settings would be 50% and 100%, or a minimum duty ratio step of 50%.
The output cycle and duty ratio are calculated as follows:
Output cycle
= (cycle comparison value +1) × 0.5 tinst.
Duty ratio (%) = ("H" pulse width compare value +1 )/(cycle compare value +1) × 100
Table 13.1-2 "6-Bit PPG Resolution and Output Cycles (0.5 tinst count clock)" shows the
available output cycle, resolution and the minimum steps for duty ratio.
"H" pulse width
= ("H" pulse width comparison value + 1) × count clock cycle
= "001010B" (10 + 1 clock cycles) × 0.5 × 4/FCH
= 11 × 0.475
s
= 5.225
s
Cycle comparison value = 011110B (30 clock cycles)
Pulse width comparison value = 001010B (10 clock cycles)
Cycle
= cycle comparison value × count clock cycle
= "011110B" (30 clock cycles) × 1 × 4/FCH
= 30 × 0.95
s
= 28.6
s
"H" pulse width
= "H" pulse width comparison value × count clock cycle
= "001010B" (10 clock cycles) × 1 × 4/FCH
= 11 × 0.95
s
= 9.5
s