Shop OBEX P1 Docs P2 Docs Learn Events
PE Lab - query on shifting LED display -IO&timing basics page 17 — Parallax Forums

PE Lab - query on shifting LED display -IO&timing basics page 17

karlikarli Posts: 16
edited 2008-05-20 23:35 in Propeller 1
·· My Parallax Propeller apprenticeship is only going into week-2.
···I've done all the lab exercises to this point in that manual and all
·· spin routines worked fine but the ShiftRightP9toP9.spin has got
·· me stunned.·· I entered it· via F10 into RAM just like its printed
·· on page 17. but when I run it I see P9 flash and then P8 comes on
·· and stays on. I modified·· waitcnt(clkfreq + cnt) so I could see it
·· run slower.· I can do a manual· outa[noparse][[/noparse]9..4]·:= %100000·· entry
·· (with a repeat on the end)· and shift the P9..P4 bits· and each LED
·· turns on per each entry.
·· when I change the last line·· to >>= 3 and run the original code
·· I get P9 to blink and the· P6 stays·ON.
·· any pointers as to what's happening here ?
·· Thanks,
·····karli.

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2008-05-19 04:31
    I just adapted the program for the Hydra (2 LEDs) and it works as advertised. Are you sure your wiring is correct (it would appear so as you seem to be able to control each LED)?
  • edited 2008-05-20 23:35
    Karli,

    It's usually best to hand enter the code for the sake of letting it sink in as you type. However, to find out if there is a coding error, try the pre-written code that comes with the zipped lab. If the symptom persists even with the pre-written demo code, than move on to the circuit checking part that kuroneko suggested.

    http://forums.parallax.com/showthread.php?p=617192

    Andy

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
Sign In or Register to comment.