
APPLICATION NOTE 78
030998 14/27
The ring oscillator is especially useful for systems which
require short bursts of processing upon resuming from
Stop mode. Operating from the ring allows the system to
wake up, perform a short operation, and return to Stop
mode in less time that it would require for an external
crystal to stabilize. This provides a two–fold power sav-
ings: The time out of Stop mode is reduced due to the
quick start of the ring oscillator, and the ring oscillator
itself typically uses less power than the crystal amplifier.
RING OSCILLATOR CONSIDERATIONS
The ring oscillator used in the High–Speed Microcon-
troller Family is essentially a chain of inverters with a
propagation delay. Although it exhibits fast start up
times, it does not carry the stability of a piezo electric
quartz crystal oscillator. The ring oscillator will oscillate
from 3 to 4 MHz over the temperature and voltage range
specified for the device. This variation makes it difficult
to generate a stable time base for timers and timing–
sensitive operations. Interrupt latencies will also be
more difficult to calculate due to the variation of the main
system clock.
It is not advised to operate the serial ports in asynchro-
nous mode (Modes 1, 2, or 3) while running from the ring
oscillator. The serial ports use internal timers to gener-
ate their baud rate, and the resulting frequency is not
stable enough to support an asynchronous serial trans-
mission. Synchronous serial transmissions in mode 0
are possible, however, due to the synchronizing clock
generated by the host processor.
The use of the ring oscillator does not impair the opera-
tion of the real–time clock, watchdog timer, or Timed
Access operations. The real time clock incorporated in
the DS87C530 is excited by an external 32 KHz crystal
which is independent of the system clock. The watch-
dog timer and Timed Access procedures both function
with respect to internal clock cycles, not an absolute
time reference, and will operate properly. If an absolute
time period is required for the watchdog timer, then an
external clock source is recommended.
PERFORMING A “RING–OSCILLATOR
SWITCHBACK”
The switchback feature of the DS87C5x0 allows the
device to “wake up” for serial port operations when oper-
ating in PMM1 or PMM2. Although the device will
execute a switchback regardless of the clock source,
the device must be operating from a crystal or external
clock source for the serial operation to be successful. In
most cases, this would preclude the use of the ring oscil-
lator or Stop mode if serial port operations are expected.
However, it is possible to “switchback” from the ring
oscillator to the crystal upon receipt of a serial transmis-
sion.
In the case of a serial transmission, the ring oscillator
presents little problem; the system can simply enable
the crystal oscillator, wait for the crystal to stabilize, and
then begin the transmission. Serial receptions are more
difficult. There is no way that a DS87C5x0 operating
from a ring oscillator will be able to successfully capture
a serial data transfer on the first try. One possible solu-
tion would be to employ an a handshaking protocol to
confirm that the receiver is ready and the data should be
resent. The key in such a scheme is to have the
DS87C5x0 detect that a serial operation has been
attempted and execute a section of code that will switch
over to the crystal source.
The recommended approach utilizes an external inter-
rupt as a serial port activity monitor. If a negative edge
triggered interrupt such as INT0, INT1, INT3, or INT5 is
tied to the RX pin, the falling edge of a start bit will gener-
ate an interrupt and a switchback. The interrupt service
routine will enable the crystal clock source and wait until
it is stable, at which time the device will transmit a ready
signal back to the originator. The following code exam-
ple demonstrates one way to do this.
In addition, the delay associated with restarting the crys-
tal can be avoided by keeping the crystal amplifier
enabled when running from the ring oscillator. This
seems counterproductive at first, as it increases the
power consumption slightly when compared to running
from the ring oscillator alone. However, when operating
the device from a relatively high–speed crystal, the
reduced speed of the ring oscillator still results in a net
power savings.