122-32000 Parallax Inc, 122-32000 Datasheet - Page 132

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Modify your code to match the following:
{{ Blinker2.spin }}
CON
<remaining code unchanged>
Here we set
crystal and configures the Propeller internal oscillator gain circuitry to drive a 4 MHz to 16
MHz crystal. Besides the crystal itself (which should be connected to the XI and XO pins),
no other external circuitry is required for this clock configuration.
Whenever external crystals or clocks are used, either
in addition to
Input pin).
settings which we’ll discuss later.
In this example we specified an
the XI pin is 5 MHz, since we have a 5 MHz crystal connected to XI and XO. Once that is
specified, the
You could also have specified a
_XINFREQ
to specify the
example, both
show how they can typically differ.
If you compile and download Blinker2 now, you should see the LEDs toggle at slightly less
than half the speed as in Exercise 8. Our settings specified an external 5 MHz crystal instead
of the internal 12 MHz oscillator.
So why would anyone want to use an external crystal that is slower than the internal clock?
Two reasons: 1) for accuracy; the internal clock is not very accurate from chip to chip or
across voltage variances but external crystals or clock/oscillators are typically very accurate,
and 2) the phase-locked loop (PLL) can only be used with external clock sources.
Try the following example:
Page 132 · Propeller Manual v1.0
_CLKMODE = RCSLOW
_CLKMODE = XTAL1
_XINFREQ = 5_000_000
MAXLEDS = 6
value would automatically be set by the Propeller Tool. However, it is more typical
_CLKFREQ
_CLKMODE
_CLKFREQ
_CLKMODE
_XINFREQ
_XINFREQ
specifies the System Clock frequency. The two are related by PLL
to
value is automatically calculated and set by the Propeller Tool.
.
and
value since
XTAL1
_XINFREQ
_CLKFREQ
which configures the clock mode for an external low-speed
_XINFREQ
_CLKFREQ
specifies the frequency coming into the XI pin (Crystal
_CLKFREQ
end up with the same value, but a later example will
'Set to internal slow clock
'Number of LED objects to use
'Set to ext. low-speed crystal
'Frequency on XIN pin is 5 MHz
value of 5 million to indicate that the frequency on
of 5 MHz (instead of
is directly affected by PLL settings. In our
_XINFREQ
or
_CLKFREQ
_XINFREQ
must be specified
) and the proper

Related parts for 122-32000