|2) I need to scan about 100+ keys, which is going to be tough with a 16F84, |but could be feasible when using two 8-bit shift registers, which results in |16*8=128 keys being scanned when using PORTB as input and e.g. RA0 for driving |the shift regs. Is this a possible approach, or should I go for a 28- or even |40-pin device (are there any re-programmable (Flash or EEPROM) 28- or 40-pin |devices, where I can use one of those inexpensive PIC programmers like Ludi, |NOPPP, COM84, etc.)? For the musical part of the keyboard, multiplexing the keyboard while allowing more than two-note polyphony will require installation of a diode per key. While that's certainly possible, you may be better off using non-multiplexed hardware. For example, you could use eight pairs of 74HC165's (8-bit shift registers) wired so that you could shift 8 bits of data at a time. This would require a total of sixteen 165's to handle 128 inputs and should lay out fairly nicely (since the 165's could be placed near the affected keys). The PIC port pins would thus be something along the lines of: RA0 -- Clock for all sixteen 165's RA1 -- Load for all sixteen 165's RA2 -- MIDI RA3/4 - Expansion RB0-7 - Inputs from all eight pairs of 165's (in each pair, the data output from one would feed the serial input of the other). Should work out pretty easily.