First I'd like to apologize for not putting [PIC] in the subject. I thought it got there automatically, won't happen again. > As I always say, learn PIC assembly so you can converse with folks, then > look to higher level languages. Yup, I'm doing that. I have the Predko book and the Katzen book. Actually I like the assembly part. The hard part for me is that the PIC books naturally assume that you've already done a fair bit of electronics. ; ) >>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. If I get it working properly I'll put the design online. The nice part is that I just scored 20 free keypads by asking around, and someone had tons of old credit scanners with a 4x4 keypad. >>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. For a controller, it would make it more useful, but I suppose I can live without that feature until it works at least. > 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. Thanks so much for the tips. If anyone knows of an example of the above somewhere, preferably both assembly and schematics, that would be lovely. Thanks Iain -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body