Propeller Chip and Cogs
So I have not used the Propeller Chip before. But saw it and had some questions. When is says that it has 8 processors (cogs). What exactly does that mean? Does it mean that it can run different things at the same time? Like for instance producing sound through·2 piezo speaker at the same time. Unlike the Basic Stamp? How does that work?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor
Comments
AND there are no interrupts to deal with[noparse]:)[/noparse]
There is a central clock... the only bottle neck is access to central RAM. The benchmark numbers are all wrong...
because each cog also has a configurable counter mechanism... which for some purposes is equivalent to adding
two more processors!!!
AND Prop is made, promoted and supported for complete idiots like me as well as for professional engineers. If you have any background at all...which I didn't... that background is immediately useful and will sort of determine how you approach the Prop.
Rich
There are indeed 8 separate processors, each with two special purpose counters and each with a video generator. Each processor has access to all 32 I/O pins and each processor gets its own time slot for access to the shared RAM. Practically, you can access a 32 bit word in shared memory once every 3 instructions.
It's trivial to start up processors with a 5 or 6 line program to drive a piezo speaker, each processor driving one speaker with a different tone. The special purpose counters can each drive a speaker as well if you want for a total of 3 per cog.
How do you access the different Cogs?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor
The syntax and the basic methodology are all explained in the learning labs... So, the first step is to get the education kit...
put it together and then go through the labs. If you do nothing else, you can get through the labs in a few days.
Rich
The only way to access the cogs is via a program loaded into the cog's memory. One cog cannot access another cog's memory. Inter-cog communication is through shared (hub) memory areas. The COGNEW or COGINIT statements (really the same instruction internally) cause the cog's memory to be loaded from shared (hub) memory (ROM or RAM), then the cog's registers are cleared and execution started. Most programs are written in the Spin language which is interpreted by a program in the chip's ROM which is copied to a cog's RAM for execution.