Buttons are simple and configuring a port for hi/lo is easy. capacitive touch sensors have no moving parts, and only require a human (or any other reasonably conductive thing) touch for input.

How it works:

Picture the microcontroller as constantly measuring the rc time constant for a fixed capacitor and resistor. the time between the hi and low state can be correlated as the number of microseconds (from simple timer useage). The number of microseconds , lets assume 500, would stay fairly constant. Now, what if you touched a pin of the cap? would the time constant change. you bet. the differential rc time constant input is a quick and simple way to make a capacitive touch sensor. TOUCH PAD GRAPHIC

Making it work [simple]

Using Bascom, there allready is a library called getrc() where A= Getrc(pind,4) returns the rc time constant in numerical format (in micro seconds). 

To designate a button bing pushed, simply poll, or check all the touch pads to determine if their rc time value is greater or less than a predetermined value. this means that a port is being 'touched' or in this case  something is being pushed.










Rensselaer Polytechnic Institute 
Electrical & Electrical Power

Free Domain Names @ .co.nr!