Page 279 - Making PIC Microcontroller Instruments and Controllers
P. 279

BUILDING  A SIMPLE  EIGHT.BUTTON


                   TOUCH  PANEL
















                   Project  6


                   TOUCH  PA  ELS
                   Today,  we see touch panels  used  everywhere. Every restaurant  and store  you visit has
                   a handful oftbem. But how exacdy  do they work?  WeIl, this chapter  describes one  way
                   to skin this cat.
                     If  you design  an instrument  or confoller  that needs a control panel  in a hu.ry, by iar
                   the easiest  way to make  one is to do it with a touch  panel.  They are flexible and inex-
                   pensive  and they  go together  fast. They  are easily reprcgrammed  and most  can be used
                   with  many applications  just  by changing the software.  Depending on your require-
                   ments,  the panel  may  be able to employ the PIC used  by the instrumenrcontroller you
                   are  designing,  or it can be designed  to have its own dedicated  pIC.
                     In this project, we will  build a touch  panel  to be placed  over a plain piece  of paper,
                   with the functions  written or the  paper  (see  Figure  20.I  ).  This  panel  will contpl the  oper
                   ation of two LEDS  connected  to the LAB-X I . We will control  the opemtion  of the LEDS
                   liom this panel.  The following functions  will  be implemented.  (Make  a mental  note that
                   the control  of a couple  of small dc motors  would be  almost identical to this application.)

                   I  Select the LED to addrcss
                   r  Tum LED on and off
                   I  Select steady  on or blinking for each LED
                   I  Blinl slo$er and  bltnk fl].ter  lor edch LED


                     The  principles  involved  in creating  a touch interface  for any number  of apptications  are
                   the same.  Once  you know how to create the interface  on the LAB  Xl,  you will  be able
                   to add the interface  to any  surface. Though  usually  placed  in front of a CRT, a  touch inter-
                   face is particularly  well suited to being  placed  in front of printed  and  painted  surfaces ro
   274   275   276   277   278   279   280   281   282   283   284