Shop OBEX P1 Docs P2 Docs Learn Events
help with cogs — Parallax Forums

help with cogs

jered11jered11 Posts: 7
edited 2012-06-09 08:08 in General Discussion
i'm new to spin language, and programming in general. i have basic knowledge of C. I am wondering if someone could give me a small code example of how to use cognew , coginit so i can run to sets of code simultaneous.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-08 21:41
    Parallax Semiconductor's AN011 gives some examples of using multiple cogs in Spin. There are also some small examples in the Propeller Manual in the descriptions of the COGNEW and COGINIT statements.

    There are several "sticky" threads in the Propeller Forum that have links to various educational resources (like this). I believe the Propeller Education Kit Labs tutorial has some further examples of multi-cog programming.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-06-09 01:35
    If you explore all the directories of the Propeller/SPIN Tool IDE, you will find a very good tutorial and lots of examples. You may be thinking that you have to look far afield to find help, but it is all there.

    Of course, if you like to confirm key features in multiple introductions - there are several authors that have written alternative material. Some are even texts that you can buy.

    If you want to print the Propeller Tutorial (which is in HTML format and has been edited to smaller version), download a copy of the Propeller Manual V1.01 in PDF and you can print out the complete original presentation. That's the one I like.
  • TymkrsTymkrs Posts: 539
    edited 2012-06-09 01:42
    And feel free to listen to First Spin on http://firstspin.tv - it looks at the Propeller and Spin from a point of view of someone who has no programming experience.
  • jered11jered11 Posts: 7
    edited 2012-06-09 07:13
    thank you. much appreciated
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-06-09 08:08
    A good bet are the blinking LED examples in the propeller manual - inside the IDE help file.
Sign In or Register to comment.