Shop OBEX P1 Docs P2 Docs Learn Events
BS2p relay control — Parallax Forums

BS2p relay control

ArchiverArchiver Posts: 46,084
edited 2002-12-30 08:30 in General Discussion
I have a new BS2p Demo Board

I currently control a relay board with a PC through the parallel port.

I'd like to just use a stamp. I've executed the example code in the
HIGH and TOGGLE commands... but how do I keep a pin HIGH to keep a
PNP transistor fired to energize a coil on the relay? All I can get
is the HIGH to fire a test LED momentarily...

Regards,

DWC

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-12-30 08:23
    Hi
    You don't need more than HIGH/LOW/TOGGLE to control your relay and
    keep your transistor on. I think your problem is that your program
    runs into and END statement (implicitly or explicitly). This
    causes the stamp to power down the outputs very 2.3 sec or so
    (it has to dow with the watchdog, the details are in the manual).
    All you have to do is to avoid the END e.g. put an endless loop at
    the end of or around your program.

    Hope this helps
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-30 08:30
    of course there is also a hardware solution to the watchdog problem:
    a sufficiently large capacitor at the base of the transistor to
    bridge the short voltage drop during the watchdog-wakeup period.
Sign In or Register to comment.