I grabbed two of those 36 key keypad boards from Paul at the last dork bot, he grabbed them out of those POS boxes [with the big LCDs that he has posted info about]. I wanted to get them working with the
Benito and also wanted work with i2c a little [as I have a bunch of these 8bit i2c i/o expanders]. The keypad has 20 i/o pins so the Benito cannot use it directly anyways.. though 12 bits of shift registering would probably be better... but either way, I wanted to use what I had + i2c.
If you didn't know, the Bentio doesn't have hardware supported i2c, so I used Peter Fleury's
i2cmaster code [slightly modified to have 100khz i2c with the bentio's 8Mhz clock] which does i2c in software [assembly]. My modified code is in the tar file below, all I had to do was modify a delay routine so that the timing would be correct with this clock and for 100khz i2c (if you're doing 400khz i2c on the benito there is no need to change this code).
Here is a photo of the setup:
/files/images/benito-i2c-midi-buttons.jpg
Here is a screen grab of #dorkbotpdx and amidi printing out info from this USB midi device (not ALL that exciting):
/files/images/benito-i2c-midi-buttons-screengrab.png
Here is a link to the code:
http://x37v.info/code/benito-i2c-midi-buttons.tar.gz