To much!!!

I am reading the forum from start to finish and It will take me more then a year to do it! There is a lit to take in. I will spend the rest of my worthless, primitive life trying to understand the spin language, to say nothing about understanding Pasm - Assembly - Machine code. So many ways to talk, speak, communicate to the propeller one (1). So many possibilities so little time. Many orders of magnitude a steep up from basic stamp activity kit (90005).
I am sending a query about a forum from Dave Scanlan "Spin code examples for the beginner (Public version) march 2008. My question is about " Example 03 using two cogs ( two processors)". Here be code:
COM
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
high = 1
low = 0
VAR
long stack 0[20]
long stack 1[20]
PUB Start
cognew(blinkingled_A16, @stack0)
cognew(blinkingled_A17, @stack1)
PRI Blingingled_A16 | pin
pin:= 16
dira[pin]:=%1
repeat 5
outa[pin]:=high
waitcnt(40_000_000 + cnt)
outa[pin]:= low
waitcnt(40_000_000 + cnt)
PRI Blinkingled_a17 | pin
pin:= 17
dira[pin]:=%1
repeat 5
outa[pin]:= high
waitcnt(40_000_000 + cnt)
outa[pin]:= liw
waitcnt(40_000_000 + cnt)
I have try ed to rewrite the code but I am more of a stinker then a thinker. Also I removed these [noparse] from the code. Are these a part of a by-gone eria?
So much I do not know. Thank you for any input. 29 jan 2019(tue).

Comments

  • ElectrodudeElectrodude Posts: 1,278
    edited 2019-01-29 - 22:59:27
    Don't read the whole forums. You will waste your whole life doing that. Some people have indices of important forum threads and projects; find such an index (I don't have a link to one; sorry) and just read the threads it lists.

    [noparse] is not for posting code. [ code ] tags (without the spaces inside the brackets) are. Your code is below, but I fixed a few typos in it; hit the quote button below my post to see the [ code ] tags in it around the code.
    COM
        _clkmode = xtal1 + pll16x
        _xinfreq = 5_000_000
        high = 1
        low = 0
    VAR
        long stack0[20]
        long stack1[20]
    PUB Start
        cognew(blinkingled_A16, @stack0)
        cognew(blinkingled_A17, @stack1)
    PRI Blinkingled_A16 | pin
        pin:= 16
        dira[pin]:=%1
        repeat 5
           outa[pin]:=high
           waitcnt(40_000_000 + cnt)
           outa[pin]:= low
           waitcnt(40_000_000 + cnt)
    PRI Blinkingled_a17 | pin
        pin:= 17
        dira[pin]:=%1
        repeat 5
           outa[pin]:= high
           waitcnt(40_000_000 + cnt)
           outa[pin]:= liw
           waitcnt(40_000_000 + cnt)
    

  • Thank you very much. I wish I was as far along as you are in programming. 29 jan 2019(tue)
  • Iguanaman,

    Start with Propeller Education Kit (PEK) textbook which introduces you to Spin piece-by-piece.

    Working with multiple Cogs is more advanced Spin so start with the basics of learning commands and how to use Methods and Objects.

    The only thing I didn't like about the PEK text is that it doesn't teach CONstants for I/O pins or anything else that's fixed.
    Code is so much easier to write, change, and understand when you have names instead of numbers.

    All of the Spin commands are explained in detail in the Propeller manual including some examples of how to use them.

    If you have questions or don't understand something then just ask but learn to walk before trying to do a marathon.
  • AwesomeCronkAwesomeCronk Posts: 620
    edited 2019-01-30 - 03:54:07
    I am learning with this book, Programming and Customizing the Multicore Propeller Microcontroller.
    That's not an explosion! That's an unscheduled rapid disassembly!

    Looking for a way to have a silicon chip made.
  • Peter JakackiPeter Jakacki Posts: 8,357
    edited 2019-01-30 - 03:56:46
    When it's all too much, then simplify, simplify, simplify.

    Load the Tachyon binary image onto the Prop, connect a terminal at 115200 baud and type:
    A 16 BLINK
    
    The LED on 16 blinks.
    Then type:
    B 17 BLINK
    
    The LED on 17 blinks (as well).
    Then type:
    10 HZ
    
    and the LED on 17 blinks even faster.

    Isn't that just "all too much" :)


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • Isn't this exactly the same question that I answered three days ago?...

    http://forums.parallax.com/discussion/169675/propeller-question
  • Iguanaman wrote: »
    I am reading the forum from start to finish and It will take me more then a year to do it!
    The first year is your 'freshman' year. You will never run out of things to learn.
    As Genetex has suggested I would recommend starting with the Propeller Education Kit textbook. You can find the PDF version in the Propeller tool under HELP
    Larry

    If the grass is greener on the other side...it's time to water your lawn.
  • Welcome Iguanaman, every journey starts with the first step. And you are living in the infinite world stretching from absolute stupidity to absolute gnosis. If you just want to work, not to reach a specific goal, start mit Peters way to tachyon. Your start will be hard, by there will then be giant leaps.
    Anyway, your first steps should be small and so ask any question here in the forum and you will get an answer. As this forumistas mostly started as freshmen like you, dont't read to much, as you will get to much information you will never know to solve problems you don't have. It's like reading FrequentlyAskedQuestions, but all questions are asked only once.
    But take the right steps and if you want to gain any knowledge, please remember: it's not the way called "The Presidents Path".
    no reason to reason if you feel feelings: in love with the propeller
Sign In or Register to comment.