Shop OBEX P1 Docs P2 Docs Learn Events
Check number of cores running. — Parallax Forums

Check number of cores running.

Peavey5150Peavey5150 Posts: 20
edited 2019-02-15 02:29 in General Discussion
I have a Propeller Activity Board WX (#32912)

How do I check the number of cores running? Is there something I can type in the serial monitor?

My friends don’t believe me when I tell them it has 8 cores. I wrote code to use 3 of the cores.
How do I prove it?

Comments

  • kwinnkwinn Posts: 8,697
    AFAIK there is no way short of adding code to count them as they are loaded. My suggestion would be to set aside some hub memory to store a short string for each cog as it is started and code to display them as
    "Cog 0 Main Program"
    "Cog 1 Serial Com1"
    "Cog 2 Unused"
    etcetera
  • Peavey5150 wrote: »
    How do I prove it?

    It depends on what you mean by proof.. Some people still believe the world's flat :|

    Maybe something like this will do -
    Silly and simple...I wanted to monitor COG usage and see what COGs were assigned, when they are released and how many I have spare.This object has 2 functions - freecount which returns the number of free COGs and freestring which returns an 8-character zero-terminated string pointer with a dot in each character position if the cog is in use and the cog-number if it is free.Alex.
    
    http://obex.parallax.com/object/557
    

    There's always this to show of the propeller's 8 cogs -
    
    Eight Talking Cogs is an educational program that demonstrates simultaneous and continuous Cog-to-Cog and Cog-to-PC communication in both synchronized and independent Cog operation. Eight Talking Cogs utilize BS2 Function Library Routines for Cog communication and Spin Lock Commands for Cog timing and resource allocation.
    
    http://obex.parallax.com/object/61
    
  • depends on what you mean by proof.. Some people still believe the world's flat :|

    Lol that’s funny
  • Peavey5150Peavey5150 Posts: 20
    edited 2019-02-15 03:22

    kwinn wrote: »
    AFAIK there is no way short of adding code to count them as they are loaded. My suggestion would be to set aside some hub memory to store a short string for each cog as it is started and code to display them as
    "Cog 0 Main Program"
    "Cog 1 Serial Com1"
    "Cog 2 Unused"
    etcetera

    I’ll see if they believe that lol
    Thanks

  • They still don’t believe it has 8 cores
  • Give them the block diagrams.
    Then have each cog do something different, like different pulse rate on LEDs.
  • Or just show them the cognew command. 😁
  • They think the clock rate is fast enough to run the LEDs all on the same core. Lol
  • Or just show them the cognew command. 😁

    What’s the cog new command?
  • Peavey5150,

    I've always loved the video demos that use VGA or composite (old TV) but the Activity board doesn't have the video circuitry and Parallax no longer sells the adapter modules.

    There are also a number of nice audio demos such as SIDcog, Retronitus, and objects for playing MP3s and WAVs.

    Nyan Cat is fun but might be annoying after a while.

    One of the most impressive video and audio demos was Turbulence by Linus Akesson so if your friends aren't impressed by that one then they must be closed minded.

    Oh and remind them that the Propeller chips does this without any support chips.

  • Ooh! fire up @cgracey 's speech synthesis code on a couple of cogs, saying four or five different things at once! If your reeeaaally imaginative, you could even make the cogs argue!
  • Cluso99Cluso99 Posts: 18,066
    You could run 8 NTSC/PAL color composite video demos at once!
    For that you need to use all 32 pins.
    That would make a nice demo :)
  • Peavey5150,

    A number of game systems have been built using the Propeller such as Hydra and LameStation.
    Here the Propeller does everything unlike an Arduino which would need multiple shields.

    1st video is Turbulence.
    https://forums.parallax.com/discussion/128614/using-the-propeller-as-a-graphics-chip-peripheral-for-other-microcontrollers

    SIDcog demo.

    I had a Commodore 64 which used the SID chip so I love watching this video. :)
  • Hello!
    Adapter modules for the Prop to display video? It's reasonably easy to wire the Prop to do that. I believe it is described in the notes that travel with the appropriate program. Or even inside the documentation for the Prop chip.
  • Ooh! fire up @cgracey 's speech synthesis code on a couple of cogs, saying four or five different things at once! If your reeeaaally imaginative, you could even make the cogs argue!

    Might be able to try that.

    I’m sure they will say they can do it on one core

  • Peavey5150 wrote: »
    Ooh! fire up @cgracey 's speech synthesis code on a couple of cogs, saying four or five different things at once! If your reeeaaally imaginative, you could even make the cogs argue!

    Might be able to try that.

    I’m sure they will say they can do it on one core

    That's good. Call them on it, and show us their program.
Sign In or Register to comment.