I've built a switching unit around a PIC16F737. There are 14 switches, each going to a different pin on the PIC. Most of the time, things work fine, but every once in a while a switch may stick - IOW, it gets pressed, the proper result is obtained, but all the other switches are non-responsive. Most of the time I can get everything to work again by pressing the 'stuck' switch again, but sometimes I have to power down and restart. Also, I've found that I can make the switch 'stick' if I press it gently and release it very slowly (although it may stick under normal pressing conditions as well). It's possible that my switches suck, but I'm wondering if it's a code thing. Here's my switch debounce code:
dbcount and dc1 are counters. Can anyone see anything wrong with this? I'm pretty sure it's actually working, although I've been having doubts as I look more at it. For instance, if I held the switch down, wouldn't the PIC get caught in this loop and never get to the actual instructions?
hey guyz,i have a problem on the program i'm tryin' 2 write,i'm using MPLAB IDE and i'm programing a PIKkit2,this programm is suppose 2 increment a count and when i press down the switch on the DEMO BOARD it suppose to stop and when i press again the button it suppose to continue with the count but i have problem on stoping the count.
hey guyz,i have a problem on the program i'm tryin' 2 write,i'm using MPLAB IDE and i'm programing a PIKkit2,this programm is suppose 2 increment a count and when i press down the switch on the DEMO BOARD it suppose to stop and when i press again the button it suppose to continue with the count but i have problem on stoping the count.
i'm sori man, i didn't know how to start my own thread previously. but now i think i can but there is still one problem how do i upload my source code.
i'm sori man, i didn't know how to start my own thread previously. but now i think i can but there is still one problem how do i upload my source code.
Although that's need another new thread since know you've spoiled the original thread here, but I'll answer your question. You have to put your code between two words (CODE) YOUR CODE (/CODE) using [ ] brackets insted of ( ) brackets and the real code instead of YOUR CODE