Shop OBEX P1 Docs P2 Docs Learn Events
I can't get WRLONG to work right (fixed) — Parallax Forums

I can't get WRLONG to work right (fixed)

BeanBean Posts: 8,129
edited 2006-05-11 02:59 in Propeller 1
Okay, I'm still working on my assembly blinkLED routine.
In the spin code you set a blinkDelay and a blinkCount and then set the blinkDone to 0,
then it wait for blinkDone to be 1.

The asm in the code waits for blinkDone to be zero, then reads the parameters and blinks the LED.
then it sets blinkDone to 1 to signal that it's done.

It seems my code is setting blinkDone to something non-zero, but not the value I want. Because even if I change the value (I think) is getting written to zero, it still works and it shouldn't.

Any ideas·what I'm doing wrong ?

Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com


COMING SOON "SD DATA LOGGER" www.sddatalogger.com

"I reject your reality, and substitute my own." Mythbusters


Post Edited (Bean (Hitt Consulting)) : 5/11/2006 2:59:45 AM GMT

Comments

  • CJCJ Posts: 470
    edited 2006-05-11 00:39
    Have you tried using a literal at that line? _Long1 is never changed and is only used once

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • CJCJ Posts: 470
    edited 2006-05-11 00:49
    looking a little closer, it looks good except it falls through the :waitthere loop when blinkdone is set to zero

    What does it do when it "isn't working"?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • CJCJ Posts: 470
    edited 2006-05-11 00:58
    maybe Repeat while blinkdone == 0 instead?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • BeanBean Posts: 8,129
    edited 2006-05-11 01:33
    When I write zero it should keep blinking, and the spin code should get hung-up at the "REPEAT UNTIL blinkDone <> 0" line.
    Originally I was trying to write "1", and the spin code was "REPEAT UNTIL blinkDone = 1" and that would never happen.
    It seems I am writing a non-zero value no matter what value I THINK I'm writing.
    I get an error if I try "WRLONG #1,_cntTime"

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com


    COMING SOON "SD DATA LOGGER" www.sddatalogger.com

    "I reject your reality, and substitute my own." Mythbusters
    ·
  • CJCJ Posts: 470
    edited 2006-05-11 02:03
    the tricks and traps thread says that the _long1 long 1 line has to go before the res lines, maybe that will fix it, if I had my propstick already, I would test it, but UPS is dragging their feet

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • BeanBean Posts: 8,129
    edited 2006-05-11 02:59
    Yep that fixed it....
    Thanks.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com


    COMING SOON "SD DATA LOGGER" www.sddatalogger.com

    "I reject your reality, and substitute my own." Mythbusters
    ·
Sign In or Register to comment.