X1 and x2 modes, Table 1. x1 and x2 mode selection – Rainbow Electronics AT89C5122 User Manual
Page 45
45
AT8xC5122/23
4202E–SCR–06/06
The CPU and peripherals clocks frequencies are defined in the table below.
X1 and X2 Modes
Use of on-chip oscillator
When the CPU and Peripherals clocks are fed by the on-chip oscillator, the CPU and
Peripherals can be configured independently in X1 or X2 mode depending on the fre-
quencies wanted by the user. There is however one exception : the periperals can be
configured in X2 mode while the CPU remains in X1 mode. This exception is handled by
the hardware and the user does not need to take care of.
The X1 or X2 modes can be individually selected for the CPU and each peripheral by
means of CKCON0 and CKCON1 registers. At reset, the CPU and Peripherals are set
all by default to X1 mode. In this mode, changing any peripheral to X2 mode has no
effect. When X2 bit is set in CKCON0 register, CPU and All peripherals are automati-
cally switched to X2 mode. It is then possible for the user to individually switch any
peripheral back to X1 mode.
In X1 mode (X2 bit cleared in CKCON0 regsiter), the PR1 prescaler is active while it is
bypassed in X2 mode (X2 bit set in CKCON0 register).
The X1 mode is true only when the prescaler PR1 is set to 1/2 (default condition at
reset).
CKS
X2
F
CK_IDLE
0
0
F
CK_XTAL1
/(2*(16-CKRL))
0
1
F
CK_XTAL1
1
0
F
CK_PLL
/(2*(16-CKRL))
1
1
Not allowed
Table 1. X1 and X2 Mode Selection
CPU
Peripherals
Status
Frequenci
X1 mode
X1 mode
Allowed
(default configuration at reset)
F
CK_IDLE
= F
CK_PERIPH
X1 mode
X2 mode
Not Allowed by the hardware
X2 mode
X1 mode
Allowed
Once the CPU is switched to X2
mode, the user is free to switch
any of the peripherals to X1
mode
F
CK_IDLE
= 2*F
CK_PERIPH
X2 mode
X2 mode
Allowed
Default configuration when CPU
is switched to X2 mode
F
CK_IDLE
= F
CK_PERIPH