Communications Controller
CMX850
1.5.6.1 Oscillator Control Register (OSCCON)
The OSCCON register allows the selection of the main system clock (external Xtal or low power 5.5MHz RC
oscillator), the 32.768kHz reference (external Xtal or system clock sub-division), and whether the clocks are
power-saved when the 8051 µC is in power down mode.
OSCCON: SFR Address $9C
All bits cleared to 0 when the device powers up. This register is not affected by the reset pin or a watchdog
reset.
Bit:
7
6
5
4
3
2
1
0
General-
purpose
flag 1
General-
purpose
flag 0
System
clock
power
down
System
clock
source
select
System
Xtal freq.
select
32.768k
clock
output
enable
32.768k
clock
power
down
32.768k
clock
source
select
OSCCON Register b7-6: General-purpose flags 1-0
These bits are available for use as general-purpose flags; they do not affect the operation of the
CMX850 hardware. Because these bits are cleared to 0 at power up but are not affected by the
reset signal, a particular use for one of them is as a “cold-start” indicator: software would initially
examine the flag to see if it contains a 0, and if so run a power-up initialisation routine before setting
the flag to 1. If the CMX850 is subsequently reset the flag would read back as a 1, allowing the
software to take alternative action (e.g. checking for a watchdog timeout).
OSCCON Register b5: System clock power down
Controls whether the system clock (either the RC or Xtal oscillator) is power saved when the 8051
µC is in power down mode (power down mode is enabled by writing 1 to PCON bit 1). This depends
on whether any of the peripheral blocks that use the system clock (i.e. Modem, CAS detector, A/D
converter, PWM) need to remain active during 8051 power down.
b5 = 1 System clock remains active during 8051 power down
b5 = 0 System clock power saved during 8051 power down
OSCCON Register b4: System clock source select
Controls whether the system clock is derived from the on-chip RC oscillator or from an external Xtal
reference. The RC oscillator has a nominal frequency of 5.5MHz but consumes much less power
than the Xtal oscillator, and so can be used when performing background tasks. The frequency of
the RC oscillator is not sufficiently accurate to allow data transfers through the modem or serial
port, however. The CMX850 powers up with the RC oscillator selected.
When switching from the RC oscillator to the Xtal reference, there will be a delay while the Xtal
oscillations build up (typically between 5ms and 20ms). In addition to this delay, the CMX850 waits
for 216 Xtal clock cycles to occur (~5ms – 6ms) during which time the system clock remains
inactive. This ensures that the Xtal oscillations have been adequately established before
proceeding. Note that the delay when switching back from the Xtal reference to the RC oscillator is
typically less than 1µs.
b4 = 1 System clock source is external Xtal, RC oscillator is powered down
b4 = 0 System clock source is 5.5MHz RC oscillator, external Xtal is powered
down
© 2003 CML Microsystems Plc
30
D/850/6