How many pins are free if I'm using VGA, mouse, and keyboard?
16 free out of 32 available. 8 used for VGA, 2 used for mouse,
2 for keyboard, 2 for USB/serial programming, 2 for I2C access to EEPROM
Why doesn't my Demo board work when I disconnect the USB?
There's an issue with the FTDI USB interface and pins 30&31.
If you have pins 30/31 set to output and the USB disconnected, the FTDI
chip with reset the Prop. The solution is to not set pins 30, 31
to output mode (as done with BS2_Functions).
What's the relative speed difference between Assembly and Spin?
Assembly is between 80 and 200 times faster. 200 is for tight
What's the relative code size difference between Assembly and Spin?
Spin is actually very compact and code sizes for equivalent tasks
are on the same order.
How do I get the VGA demos to work well with a very old monitor?
Try setting the "pixel rate" to 25 MHz instead of 35 MHz. Try
reducing number of vertical pixels to 383 instead of 384.
How does an assembly program get into a cog when the COGNEW command
The COGINIT instruction triggers the cog to load
itself with the assembly code data.
What's a good way to add an led to a pin regardless of whether it is
input or output?
I like Oz's circuit
here. Instead of going to a switch, you can have it go to your
own input or output signal lead.
Why doesn't my FTDI USB to serial interface (e.g., Prop Plug)
work? The Propeller Tool can't find my board!
Try the Troubleshooting guide
here. (on the USB driver download page).
Try not going through a hub. Make sure board has good power.
Make sure Prop Plug isn't upside down (this got me :)
Why do the Propeller Demo and Proto boards use 5 MHz crystals while the
Hydra uses a 10 MHz crystal?
Both crystals generate a 80 MHz maximum clock using the PLL.
Demo and Proto do this at PLLx16 and Hydra does this with PLLx8, or 16
and 8 times the crystal frequency, respectively.
The Hydra system was developed by a 3rd party (Andre') and he made
his own decisions. \
Another compatibility issue is that the Hydra uses 4 pins for both
keyboard and mouse while Proto, Demo boards only use 2 pins, so the
drivers are different.
How can I generate random numbers?
There's a big discussion and Chip Gracey has posted code to generate
"real" random numbers
here in this forum thread. Also, I generate psuedorandom
numbers in my BlackJack game!
How can I connect the Propeller to the Internet?
Easiest way appears to use the
ENC28J60 Ethernet controller chip. An object exists in the
Object Exchange to
interface with this chip.
Also, 3rd parties, such as uController.com, are selling boards with this chip.
Parallax also sells a more advanced board,
(Parallax Internet Netburner Kit), with serial interface.
What range of colors can I produce on TV or VGA?
The rated clock speed is 80 MHz. The rated maximum external
crystal frequency is 10 MHz when using the PLL (phase-locked loop).
80 MHz is achieved on the proto and demo boards using an external 5
MHz crystal and the PLL in 16x mode. It can also be done with a 10
MHz crystal and the PLL in 8x mode as with the Hydra.
Testing has shown that 100 MHz can be achieved using an external 100
MHz crystal and not using the PLL. One could also use a 6.25 MHz
crystal and the PLL in 16x mode, but this is a non-standard frequency.
However, you could run at 96 MHz with a standard 6 MHz crystal.
The maximum speed is a function of temperature and is
currently being tested and will be published in the "final" datasheet.
Note: Care must be taken when selecting a crystal as the
propeller only uses the fundamental frequency of crystals, but they are
often labeled with their second or third harmonics. This is not an
issue for powered oscillators, however, because they have internal
circuitry to give the labeled output.
What limits the maximum clock frequency?
The clock frequency is limited by the rise/fall time of the logic.
The rise/fall times are functions of temperature and applied voltage, so
the chip is faster when cold and with higher voltage. The new
datasheet (v.1.0) shows this relationship.
How big does the stack for Cognew have to be?
The spin interpreter requires some stack space for passing
parameters and return addresses during function calls.
There is no universal number. It depends on how deep you call
functions and how many parameters you pass to functions. Recursion
makes the calculation especially difficult.
Very simple programs can get away with 9 longs as in the manual's
example. Medium programs (without recursion and limited nested
function calls) can probably get away with ~50 longs. For larger,
more complex programs, you will probably have to carefully monitor stack
If you overflow the stack your other variables and program and RAM
will be overwritten. There is code posted in the forum that writes
specific data to the stack space and monitors it for changes to see how
much is being used.
From Jeff Martin: There’s also an object called “Stack” that
comes with the Propeller Tool, and is also available on the Propeller
Object Exchange, to help determine an object’s stack usage.
Where is the stack space for the main SPIN program?
The compiler hard-codes the end of the program as where stack space
begins. So, you have to be sure to leave some room there.
You can use the directive "_STACK" to force the compiler to leave room
or give an error message.
How does the compiler store variables in the "VAR" section and how are
Variables in the VAR section are reorganized with longs first, then
words, and last bytes. The longs are long aligned. Words are
all word aligned.
This is critical for passing arguments to an assembly routine using
Cognew. Personally, I think it is better to pass an address in the
DAT section to avoid alignment/reorganization problems.