which cogs are being used?
Dan Olson
Posts: 1
Is there an easy way to figure out how many cogs are running and which ones they are? I'm mostly curious about this with regards to the TV_Terminal object. I read in the Propeller Manual that the TV_Terminal object starts 2 cogs, but it's not clear to me from looking at the code how those cogs get started.
Also, can either of the cogs that the TV_Terminal object is using be devoted to other things? My main program loop is running very fast, which causes the display to flicker, so I was thinking about moving the display update routine it to its own cog, but using 3 cogs for debugging might not leave enough room for my actual program.
For people who have done a lot of development on the Propeller, what do you recommend for debugging? I liked debug command that was used with the Basic Stamps. Is there anything similar for a Propeller?
Thanks,
Dan
Also, can either of the cogs that the TV_Terminal object is using be devoted to other things? My main program loop is running very fast, which causes the display to flicker, so I was thinking about moving the display update routine it to its own cog, but using 3 cogs for debugging might not leave enough room for my actual program.
For people who have done a lot of development on the Propeller, what do you recommend for debugging? I liked debug command that was used with the Basic Stamps. Is there anything similar for a Propeller?
Thanks,
Dan
Comments
You could also use the TV output if you're not using it for your program. TV_Terminal is a good basic TV driver, but there are others. There's one called a windowed text driver that provides for separate windows, each with its own scrolling ability. They don't overlap, but they're handy.
I've done a bit of debugging where the actual program uses a VGA display and a TV driver is used as well for debugging only. It only takes 3 I/O pins and a cog to support it.
There's no special DEBUG command, but all the text output drivers provide for output of text strings and formatters for decimal, hexadecimal, and binary. Take a look at any one of them. They all use the same names for the routines.
The cog that's being used to generate the TV display is not available for other uses because of the timing demands of video generation.
TV_Terminal starts up one cog for the TV video generation and one cog for graphics support. If you only need text, you can use the TV_Text driver instead which is text-only, takes up much less space and is faster. The windowed text driver is also smaller and faster since it's text-only.
It also only uses one cog.