Propeller clock speed
charlieamer
Posts: 2
Hi, I am amateur in electronics, and I am transfering from Arduino platform, because of my new project which involves camera, and arduino is too slow to handle it. I've read wikipedia articles about propeller, and I couldn't find propeller's actual speed in MHz. Can you please help me determine it, or someone to simplify these informations for me (from Wikipedia):
And another thing, I am not sure if this can go on this forum, but still, I couldn't find the answer:
What is the frequency of clock or crystal, which executes code on "Gadget Gangster QuickStart" ?
Thank you in advance, Amer.
How do I choose if I am going to use internal or external clock ? Are these actual values for speed of execution per cog ?The Propeller can be clocked using either an internal, on-chip oscillator (providing a lower total parts count, but sacrificing some accuracy and thermal stability) or an external crystal or resonator (providing higher maximum speed with greater accuracy at an increased total cost). Only the external oscillator may be run through an on-chip PLLclock multiplier, which may be set at 1x, 2x, 4x, 8x, or 16x
And another thing, I am not sure if this can go on this forum, but still, I couldn't find the answer:
What is the frequency of clock or crystal, which executes code on "Gadget Gangster QuickStart" ?
Thank you in advance, Amer.
Comments
Most instructions take 4 system clock cycles to execute ... 50ns per instruction with an 80MHz clock. Spin is the most commonly used programming language and is translated into an interpretive code (byte codes) executed by a built-in interpreter with the bytecode instructions taking a few microseconds depending on their complexity. There are several C compilers available as well as other programming languages and tools.
The Propeller can be overclocked with a more limited temperature range (see the datasheet for test details), careful supply voltage regulation, and good PCB design principles used. 96MHz (6 x 16) and 104MHz (6.5 x 16) have been used.
It's easy to switch back and forth between different PLL multipliers and you lose timekeeping for only a clock cycle or two ... not much if you do that only for turning "off" and "on".
If that's still too much current, you'll have to use the 32KHz internal RC clock and go to some kind of external RTC or at least a 32KHz crystal oscillator and divider connected to an I/O pin.
So could I apply a 32KHz crystal to an I/O pin and update every time it crosses from logic high to low. Then divide the result by 32000. That would give me a second. If I use this for my clock, can I switch from external 5MHZ crystal to internal RC osc. when the device is switched to "low power" mode? Is it possible to switch from external clock to internal during program?
I wouldn't just apply a 32KHz crystal to an I/O pin. It probably won't oscillate. At least use a package of CMOS gates (usually a hex buffer) as an oscillator / buffer. Better would be something like this cheap oscillator / counter that would run continuously at 32KHz with very low power consumption and put out pulses at a selectable submultiple of 32KHz that the Prop would use as its time standard while running off the (roughly) 32KHz internal clock. I would run one of the cog counters off this and periodically wake up the Prop to update the stored time and date and act on any scheduled actions.
I have to do both catching frames from camera and process it, but it doesn't have to be in realtime. I've thought of using DRAM for storing a frame. My project requires me to do heavy calculations on picture, and when it finishes with those calculations, start the same calculation on a new frame.
Have you seen the CMUcam4?
http://www.cmucam.org/projects/cmucam4/wiki
Its a propeller powered color tracking sensor. It interface with a camera module.
You can find the source code here: http://cmucam.org/projects/cmucam4/wiki/Firmware_Source_Code_and_Binaries
Additionally, I wrote a simplified interface object to control the CMUcam4 in SPIN that can be found here: http://cmucam.org/projects/cmucam4/wiki/Low_Power_Motion_Detection.
---
Programming the propeller is a radically different experience from the Arduino. As an Arduino programmer, you usually use other people's libraries and never have to write your own. This makes programming easy but it also means that you learn less. You you program the propeller, you need to know how the chip works, and how to program it in assembly to really get the full benefit of the chip. You can do some stuff in SPIN, but it won't be speedy.
That said, the C programming environment for the propeller chip also also available, but not that many libraries have been written for it like the Arduino that make it super easy to use. If rolling your own stuff doesn't bother you too much, then you should be fine in the C environment.
Thanks,
It is possible to buffer images in memory, but there are limitations.
Thanks,