On Sun, Aug 22, 2004 at 02:01:35PM +0000, iain duncan wrote: > I am a newbie to pics and electronics, though I have no problems with > assembly programming. As I always say, learn PIC assembly so you can converse with folks, then look to higher level languages. > I get much more confused by what's going on > outside the pic. I would like to interface four 4x4 keypads to one chip > that will also do midi output, which i guess means multiplexing of some > sort, It does. > is this likely to be a terribly difficult project? Not really. It'll require some external hardware I'd guess off the top of my head. >Can anyone tell > me what other parts I will need to get more than one keypad into the > pic, or point me at any good resources for this? Is there anyone on here > who might have made a keypad-to-midi controller? It'll be an interesting device for sure. > > Also, will it be possible in such a situation to write the firmware so > that it can accept multiple simultaneous keypresses across the pads, or > is that reall hard? That'll make it harder. OK let's talk about organization. You can organize your keypads in 3 configurations: 1) 4 individual keypads. 2) A single 8x8 keypad. 3) A single 4x16 keypad. Each will require a different amount of I/O 1) The 4 individual keypads would require 32 I/O lines 2) The 8x8 would require 16 I/O lines. 3) The 4x16 would require 20 I/O lines. In each case a decoder and/or multiplexer can be used to reduce the lines to the corresponding power of 2. So for the cost of a chip, you can greatly reduce the number of lines required. Personally I'd organize in the 8x8 wiring the 4 keypads in a square. Then I'd drive the rows with the outputs of a 74HC138 decoder, and read the outputs from the columns using a 74HC151 multiplexer. It'll take 7 PIC I/O pins to do the job: 3 to drive the HC138, 3 to drive the HC151, and one input to read the HC151. BAJ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body