RL78/G13
Clock Generator (Clock Switching) CC-RL
R01AN2831EJ0100 Rev. 1.00
Page 12 of 51
May 28, 2015
5.4
List of Constants
Table 5.3 lists the constants that are used in this sample program.
Table 5.3 Constants for Sample Program
Constant Setting Description
HOCO_NEXT_STATUS_X1
1
Clock status
: Operating on the HOCO clock and the next clock is
the X1 oscillation clock.
X1_NEXT_STATUS_XT1
2
Clock status
: Operating on the X1 oscillation clock and the next
clock is the XT1 oscillation clock.
XT1_NEXT_STATUS_HOCO
3
Clock status
: Operating on the XT1 oscillation clock and the next
clock is the HOCO clock.
X1_STATUS
1
The current status is operation on X1 oscillation clock.
XT1_STATUS
2
The current status is operation on XT1 oscillation
clock.
HOCO_STATUS
3
The current status is operation on HOCO clock.
CHATTERING_WAIT
10
Wait time to deal with chattering is 10 ms.
HOCO_LED_SETTING_CHANNEL_PRESCAL
ER
9
Frequency division ratio of channel 0 of TAU0 when
HOCO clock is selected
HOCO_LED_SETTING_CHANNEL_COUNT
15625
Count value of channel 0 of TAU0 when HOCO clock
is selected
X1_LED_SETTING_CHANNEL_PRESCALER
9
Frequency division ratio of channel 0 of TAU0 when
X1 oscillation clock is selected
X1_LED_SETTING_CHANNEL_COUNT
19531
Count value of channel 0 of TAU0 when X1 oscillation
clock is selected
XT1_LED_SETTING_CHANNEL_PRESCALER
9
Frequency division ratio of channel 0 of TAU0 when
XT1 oscillation clock is selected
XT1_LED_SETTING_CHANNEL_COUNT
64
Count value of channel 0 of TAU0 when XT1
oscillation clock is selected
SWITCH_OFF
0
Switch is not pressed
SWITCH_ON
1
Switch is pressed
SWITCH_ON_PORT_LEVEL
0
Input port level when switch is on
CLOCK_NOT_OSCILLATING
0
Clock is not oscillating.
CLOCK_OSCILLATING
1
Clock is oscillating.