Propeller Question

This discussion was created from comments split from: Happy New Year 2019.

Comments

  • I am sending a queery 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). This is the code that I try ed to get to work.
    CON
    _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)
    PRT 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]:=low
    waitcnt(40_000_000 + cnt)
    I have tried to rewrite the code but I am more of a stinker then a thinker. Also I removed the [noparse] from the code. Are these part of a by-gone Erie? I am reading all the forums from the beginning date 2006 to recent. I hope to have them all read by the end of this year? Thank you for any help. 26 jan 2019(sat).
  • Brian FairchildBrian Fairchild Posts: 504
    edited 2019-01-26 - 19:14:09
    Corrected code...

Sign In or Register to comment.