On Sun, 7 Jun 1998, David Duffy wrote: > I came across a way to connect a keypad to micro with only one pin; > It appears in "Electronic Design Online". This is the web version > of the trade magazine - worth a read and best of all it's free ! > > http://www.penton.com/ed/Pages/magpages/may0198/ifd/0501ifd.htm#5 > It is a cool design. Unfortunately they also have a 555 timer (gag) in the circuit (in addition to the microcontroller). I bet (or know?) that it's possible to toss the 555 and still do the job with a single I/O line. In essence, the (simplified) circuit is: | PIC I/O +---/\/\/\-----+ | R | | === C | | /// Where the value of R depends on which key is pressed and C is fixed (but other wise arbitrary). There are a number of algorithms that can measure 'R' given 'C'. For example, BC tip #4 can be adapted to this. However I think the easiest way is to discharge C and then charge it up with pulses of current until it exceeds the PIC I/O input threshold. The number of charge pulses required will be somewhat proportional to R. Scott