Hello All,
I've finally gotten my first PICAXE program to function the way I'd like. The only problem at the moment is I'm using the button command to check the status of four buttons and while this works most of the time, once in a while the button press is not detected and must be pressed again (in order to advance a countdown display).
I was wondering if there is a way to increase reliability.
Some thoughts I had were:
- Elimination the button command altogether and perhaps adding a 20ms pause to allow for debounce
- Adding something external to eliminate debounce such as a capacitor and resistor and scanning each input
- Somehow reduce the total number of lines of code/processes to increase button checking speed
I just wanted to check and see if anyone had similar problems using the button command and how they overcame them. Perhaps the problem is how I've written the code and not the button commands themselves. I've learned the PICAXE takes a lot longer to run than I'm used to and I've learned a lot over the past week and half.
Thank you in advance for any advice and assistance.
I've finally gotten my first PICAXE program to function the way I'd like. The only problem at the moment is I'm using the button command to check the status of four buttons and while this works most of the time, once in a while the button press is not detected and must be pressed again (in order to advance a countdown display).
I was wondering if there is a way to increase reliability.
Some thoughts I had were:
- Elimination the button command altogether and perhaps adding a 20ms pause to allow for debounce
- Adding something external to eliminate debounce such as a capacitor and resistor and scanning each input
- Somehow reduce the total number of lines of code/processes to increase button checking speed
I just wanted to check and see if anyone had similar problems using the button command and how they overcame them. Perhaps the problem is how I've written the code and not the button commands themselves. I've learned the PICAXE takes a lot longer to run than I'm used to and I've learned a lot over the past week and half.
Thank you in advance for any advice and assistance.
Attachments
-
16.4 KB Views: 19