Andrei IRL
Senior Member
Hello everyone.
I have a very strange issue that i am trying to understand and possibly fix.
For some reason, some times part of my code that should only trigger upon receiving HIGH signal gets triggered by itself.
I am using latest PICAXE 08M2+ chip.
The device is used on a motorcycle and is powered by the bikes on-board power.
I have attached the circuit diagram.
I am using LM7812 and 78LM05 as i require dual voltage.
So the power gets regulated twice before getting to the PICAXE.
I am using two electrolytic caps on the either side of the LM7812 Regulator, 22nF and 10nF or something around these values.
Below is the part of the code thats running continuously on the CHIP.
The Code is monitoring input on PIN3, and should only trigger when PIN3 goes HIGH.
This is the part that gets randomly triggered randomly. It happens rarely but still does.
ReadAdc is monitoring input from two buttons connected in Voltage divider configuration.
I have attached circuit diagrams i am using for the power supply as well as the main circuit itself.
PIN3 has a 10K Pull Down resistor as part of the voltage divider so i really dont understand what triggers the input into thinking its HIGH?
Many thanks in advance.
I have a very strange issue that i am trying to understand and possibly fix.
For some reason, some times part of my code that should only trigger upon receiving HIGH signal gets triggered by itself.
I am using latest PICAXE 08M2+ chip.
The device is used on a motorcycle and is powered by the bikes on-board power.
I have attached the circuit diagram.
I am using LM7812 and 78LM05 as i require dual voltage.
So the power gets regulated twice before getting to the PICAXE.
I am using two electrolytic caps on the either side of the LM7812 Regulator, 22nF and 10nF or something around these values.
Below is the part of the code thats running continuously on the CHIP.
Code:
main: high greenled
if pin3=1 then fire
ReadAdc 1, b5
Select Case b5
Case > 144 : Goto BothPushed
Case > 106 : Goto Plusone
Case > 42 : Goto Minusone
End Select
goto main
This is the part that gets randomly triggered randomly. It happens rarely but still does.
ReadAdc is monitoring input from two buttons connected in Voltage divider configuration.
I have attached circuit diagrams i am using for the power supply as well as the main circuit itself.
PIN3 has a 10K Pull Down resistor as part of the voltage divider so i really dont understand what triggers the input into thinking its HIGH?
Many thanks in advance.