Propeller Manual

Table Of Contents
Introducing the Propeller Chip
Page 30 · Propeller Manual v1.1
Table 1-10: CLK Register CLKSELx (Bits 2:0)
CLKSELx
2 1 0
_CLKMODE
Setting
Master
Clock
Source Notes
0 0 0
RCFAST
~12 MHz Internal
No external parts.
May range from 8 MHz to 20 MHz.
0 0 1
RCSLOW
~20 kHz Internal
Very low power. No external parts.
May range from 13 kHz to 33 kHz.
0 1 0
XINPUT
XIN OSC OSCENA must be '1'.
0 1 1
XTALx and PLL1X
XIN x 1 OSC+PLL OSCENA and PLLENA must be '1'.
1 0 0
XTALx and PLL2X
XIN x 2 OSC+PLL OSCENA and PLLENA must be '1'.
1 0 1
XTALx and PLL4X
XIN x 4 OSC+PLL OSCENA and PLLENA must be '1'.
1 1 0
XTALx and PLL8X
XIN x 8 OSC+PLL OSCENA and PLLENA must be '1'.
1 1 1
XTALx and PLL16X
XIN x 16 OSC+PLL OSCENA and PLLENA must be '1'.
Locks
There are eight lock bits (also known as semaphores) available to facilitate exclusive access
to user-defined resources among multiple cogs. If a block of memory is to be used by two or
more cogs at once and that block consists of more than one long (four bytes), the cogs will
each have to perform multiple reads and writes to retrieve or update that memory block. This
leads to the likely possibility of read/write contention on that memory block where one cog
may be writing while another is reading, resulting in misreads and/or miswrites.
The locks are global bits accessed through the Hub via the hub instructions:
LOCKNEW,
LOCKRET, T LOCKSET, and LOCKCLR. Because locks are accessed only through the Hub, only one
cog at a time can affect them, making this an effective control mechanism. The Hub
maintains an inventory of which locks are in use and their current states, and cogs can check
out, return, set, and clear locks as needed during run time. See
LOCKNEW, 122; LOCKRET 125T, ;
LOCKSETT, 126; and LOCKCLR, 120 for more information.
Main Memory
The Main Memory is a block of 64 K bytes (16 K longs) that is accessible by all cogs as a
mutually exclusive resource through the Hub. It consists of 32 KB of RAM and 32 KB of