Shop OBEX P1 Docs P2 Docs Learn Events
MCP (Master Control Program) simple spin example launcher for beginners — Parallax Forums

MCP (Master Control Program) simple spin example launcher for beginners

Kilo140Kilo140 Posts: 3
edited 2006-09-22 00:30 in Propeller 1
Hi All,

This is my first posting. Myself and a few friends are having a great time with Propsticks and making our own demo/proto boards. For common interfaces we maintain compatability with the Parallax demo board so we can share demos etc.

One thing all beginners want to do is run up as many demo programs on different cogs at once to get some sense of what the chip can do. My answer is the MCP (Remember Tron?).

I tried to launch spin code by including objects from other files and demo's into mcp but could not launch them with cognew as it appears the code must reside in the object (file)·that is calling cognew. To work around this, I created a level of indirection where I include the OBJ definition for thexternal file in mcp, then create a PRI private definition which just calls the entry point of the external OBJ files. This allows me take lots of examples as posted here, and launch them all with MCP into differing cogs by essentially calling the demo OBJ in its spin file. I also define a sign-on message on composite video which lists each demo as it starts and displays the cog assigned. (-1 if out of cogs) Cogs 1-2 are used for video, and cog0 starts out life as MCP and then after launching all the cognews, falls into the excellent Digital Storage Scope just posted.

This means you may lanch up to 5 demos, and be left with the digital scope on the TV screen to monitor all their I/O pins.

Hope this is of use to someone starting out like us. Top file is mcp2.spin and is liberally commented.
Many thanks to those whose demos I have included in the archive for the purposes of supplying the MCP example working.

Phil

Comments

Sign In or Register to comment.