Using several cogs
eduardomorais
Posts: 11
Could anyone give me a program where one makes use of several cogs. I'd like to better understand the use thereof.
I'm using the card propeller parallax. It is has a eight cogs.
Thanks already.
I'm using the card propeller parallax. It is has a eight cogs.
Thanks already.
Comments
Everywhere you look on the forum there is use of multiple cogs. Firstly, the most basic is to use a cog to send/receive to the pc. Next, you can add a VGA monitor (uses a couple of cogs depending on which VGA driver. TV can use 1 or more cogs. A keyboard will use 1 cog. Interfacing to an SD card will use 2 cogs - one for the low level SPI interface and 1 for the FAT implementation. Remember, our drivers take care of a lot of other things normally done in main code is other micros.
So, our FullDuplexSerial object that does serial does more than just perform a UART function, it actually takes care of everything so all you do is place characters into a buffer and take the received characters out of a buffer.
The of course, there is ZiCog which performs a whole Z80 & CPM emulation.
if you are refering to the prop demoboard (or other board with VGA connector) and find propforth on google code, an example that might be interesting is LowResVGA.f
The propforth kernel runs a user prompt on cog6, which communicates to the PC serial port via cog7. User input entered in the PC terminal propgram is processed interactively.
Cog3 and cog4 are have user prompts which are displayed on the VGA terminal connected directly to the propboard, and the user input is entered from the keyboard connected directly to the propboard.
The user can interact with the cogs at the same time, type input into one cog which and change stuff on the other cogs.
connect LEDs through resisters to pins 16-23