David Harris wrote... >CHALLENGE: can you scan a keyboard, and run an LCD display with only 8 = pins/bits >=3D 1 port -- without extra active hardware? How about operating a keypad with nothing more than a single PIC A/D input pin? =20 The diagram below shows how this can be done, by connecting the row/column lines of the keypad to resistors so that each key (the X's in the diagram below) results in a different resistance value. This resistance is connected, along with a load resistor (the 22K shown below), in a voltage divider between Vcc and ground; each key gives a different voltage, thus a different A/D reading. I didn't dream this up on my own, BTW, so I can't take "challenge" credit for it; I saw it about a year ago in the Design Ideas column in one of the electronics rags (either EDN or Electronic Design, I forget which). It should work, even if it is a little unusual... X-------X-------X-------X----------+--Vcc =20 | | | | | =20 | | | | | =20 X-------X-------X-------X---4.7K---+ =20 | | | | | =20 | | | | | =20 X-------X-------X-------X---10K----+ =20 | | | | | =20 | | | | | =20 X-------X-------X-------X---15K----+ =20 | | | | =20 | 1.2K 2.4K 3.6K =20 | | | | =20 +-------+-------+-------+--> To PIC A/D Input =20 | =20 22K =20 | =20 GND =20 =20 Hope this helps... Dave -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body