Shop OBEX P1 Docs P2 Docs Learn Events
DevBoard Output behavior — Parallax Forums

DevBoard Output behavior

ALIBEALIBE Posts: 299
edited 2006-09-04 14:28 in Propeller 1
shocked.gif
Not sure if this is really an issue or if I'm doing something wrong. I wanted to get this grps' thoughts

I got my dev board (and a whole bunch of sensor toys w/ that, including the propkit - don't tell my wife).

If you run the below code (note #2 is commented out) on devboard;
········ #1 - lights up LED @ p16 and #2 - LED @ p17·work as expected.
········· However, uncomment #2 line ahead and re run it.
················ I see #1 work as expected,
················ I see #2 work as expectd (p18/19 light up) and
················ when the execution hits #3,
························· I see the LED @ pin 17 light up and at the same time 18/19 stay lit up

what am I missing.
thanks, ALIBE

Pub Main
· Toggle(16,3_000_000,10)· '· #1
· ' Toggle(19,4_000_000,5)·· '· #2
· Toggle(17,1_000_000,15) '· #3

Pub Toggle(Pin, Delay, Count)·················
· DirA[noparse][[/noparse]Pin]~~
· Repeat Count
··· !OutA[noparse][[/noparse]Pin]
··· WaitCnt(Delay + cnt)

Comments

  • KaosKaos Posts: 1
    edited 2006-09-03 23:05
    Alibe,

    Your #2 and #3 have odd numbers for <count>. This will leave the state of the pin high when started from a low state. An even number will leave the pin in the low or off state.
  • ALIBEALIBE Posts: 299
    edited 2006-09-04 14:28
    Kaos,
    thanks for the catch.

    It helps is I paid some attention - does'nt it [noparse]:)[/noparse]
Sign In or Register to comment.