Shop OBEX P1 Docs P2 Docs Learn Events
help with haywire initial sequence — Parallax Forums

help with haywire initial sequence

dangdang Posts: 14
edited 2006-11-09 00:23 in BASIC Stamp
I've got a mosfet (RFP12N10L) array to control five solenoids. Currently I am testing it with LEDs to get bugs worked out prior to final hookup.

Problem is: with a repetative sequence of pulses (either a do, loop or a goto statement) the first time through after power-on is haywire; multiple LEDs lighting simultaneously, making blinky half pulses, etc. Then, after initial sequence is through and starts again on the first repeat she runs normally, sequencing as the program indicates. The haywire period is the same with each power-on. This happens in roughly the same manner with multiple test programs using all the ways I know of programming blinking sequences that repeat.

Could this be a wiring problem? All connections are decent and wriggling wires makes no difference.

I'm stumped.

Comments

  • bsparkybsparky Posts: 52
    edited 2006-11-07 14:04
    When powering up your pin will float high or low till the stamp comes fully to life. Connect a 5K to 10K resistor on your pins to ground this should take care of your problem.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-11-07 14:22
    This also happens when you don't have an "Init" section, which assigns the exact initial output state you desire on all your pins, before the program begins 'cycling' in your 'main' loop.
  • dangdang Posts: 14
    edited 2006-11-09 00:23
    Works now, the programs I was trying did have an initialization section, but those pull-ups did the trick.

    Thanks all!!

    Dan
Sign In or Register to comment.