I'm trying to do a prototype board using the toggle commands. Done it on a breadboard using axe029 into a 20m2. I'm using an audio detector from E-Bay which goes high at 3.0volts when active for 2 seconds. I am using four detectors in total. The problem is the circuit becomes what I believe to be very capacitive. Just touching a wire will set it off. Sometimes even a finger close to the circuit will do the same. The circuit in general, is very unstable and when the toggled pin goes high, it will then after a short time go low. Of course this pin should stay high until toggled again. Ive tried using a bypass capacitor on each output but that didn't help. Have a 104 cap across the 5v dc battery input. Can anyone help me on this ?. Thanks .
Code.
#picaxe 20m2
main:
if pinC.1=1 then
toggle c.2
pause 5500 'This pause allows time for the detector to go low.
endif
if pinc.5=1 then
toggle B.0
pause 5500
endif
if pinB.1=1 then
toggle B.2
pause 5500
endif
if pinB.3=1 then
toggle B.4
pause 5500
endif
goto main
Code.
#picaxe 20m2
main:
if pinC.1=1 then
toggle c.2
pause 5500 'This pause allows time for the detector to go low.
endif
if pinc.5=1 then
toggle B.0
pause 5500
endif
if pinB.1=1 then
toggle B.2
pause 5500
endif
if pinB.3=1 then
toggle B.4
pause 5500
endif
goto main