Tact Switches are Culprits

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: