BS2p relay control
Archiver
Posts: 46,084
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
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
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
a sufficiently large capacitor at the base of the transistor to
bridge the short voltage drop during the watchdog-wakeup period.