Shop OBEX P1 Docs P2 Docs Learn Events
Why this code does not work - — Parallax Forums

Why this code does not work -

SiriSiri Posts: 220
edited 2008-09-17 20:25 in Propeller 1
I am learning PASM and I cannot figure out why this code does not toggle the LED on PIN7.
Please explain in as much detail as possible.
Thanks.

Siri

P.S: The code is attached.

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-09-17 19:39
    The first thing I see is that p7 is never defined, If this is the only object you are using the initial method executed (start) will fill 0 in for the value of p7. Change the first line of the method to pin7 := |< 7. Also the value 9 added to Time may be too small for it to sync the first go around (meaning it will be roughly a minute before it will proceed). Try inserting a larger value (say 32) just to make sure this isn't happeing. Later after you have it working properly you can dial it down to the minimum number possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • SiriSiri Posts: 220
    edited 2008-09-17 20:25
    Paul,
    Thank you - It is working now.

    Siri
Sign In or Register to comment.