Tact Switches are Culprits

March 10, 2010

Tact switches are culprits

One of the several boards that was populated in order to cater to the needs of students didn’t work to my surprise. I measured the voltage across power supply terminals and between OSC2 and ground. They appeared to be perfect and I was not able to identify why the board wasn’t functional. I forgot to measure the voltage between the MCLR pin and the ground. When, I tried holding my MCLR pin at 5v, my board started working!

I planned to go for a tact switch in order to reset the controller on occasions of “hang-up” of the microcontroller. I had an heated argument with my friend about tact switches while designing this board. My friend told me that ” Tact switches are culprits”. I shrugged off his threat and moved on to taste my own medicine :(.

Tact switch springs are usually of poor quality and they cannot return to their original state on several occasions. In general ,it is advisable to go for debounce logic in your program if you are using a tact switch for any digital input. For reset option, it is advisable to use a power-on reset i.e Your controller resets every time you switch on the power supply.