This is a multi-part message in MIME format. --------------2792BE132D058B249714177E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit --------------2792BE132D058B249714177E Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: Received: from femail45.sdc1.sfba.home.com ([24.254.60.39]) by priv-edtnes09-hme0.telusplanet.net (InterMail vM.5.01.04.01 201-253-122-122-101-20011014) with ESMTP id <20020209201602.ZNII16355.priv-edtnes09-hme0.telusplanet.net@femail45.sdc1.sfba.home.com> for ; Sat, 9 Feb 2002 13:16:02 -0700 Received: from pcp01386542pcs.walngs01.pa.comcast.net ([68.81.88.134]) by femail45.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20020209201601.QIXN5468.femail45.sdc1.sfba.home.com@pcp01386542pcs.walngs01.pa.comcast.net> for ; Sat, 9 Feb 2002 12:16:01 -0800 From: dilatush@home.com (Dave Dilatush) To: dpharris@telus.net Subject: Re: [PIC]: CHALLENGE: 4x4 keyboard and LCD with 1 port = 8 bits Date: Sat, 09 Feb 2002 20:14:38 GMT Message-ID: <3c6580e0.21144451@mail> References: <3C64A274.2070403@ubasics.com> <005d01c1b17b$5bb707a0$0101a8c0@brusque> <3C656008.C876EBE7@telus.net> In-Reply-To: <3C656008.C876EBE7@telus.net> X-Mailer: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Mozilla-Status2: 00000000 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 --------------2792BE132D058B249714177E-- -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body