First, I've traced out the connections between the front panel buttons and the processor. The sixteen keys are wired in a 4 row x 4 column matrix (shocking, I know). The eight lines are connected to PC0-PC3 and PE4-PE7 on the processor. Still to do is figure out is which pins are configured as outputs and which as inputs.
That might not be so important now that I've also figured out the wiring to the expansion connector on the back of the unit. Here's how it breaks down:
- Four pins are connected to the SPI port on the Atmega 128: SS*, SCK, MOSI, and MISO.
- Two pins are connected to TXD0, RXD0. Another two pins are connected to TXD1, RXD1.
- There are a couple seemingly miscellaneous connections to PB4, PC4, PE2, and PE3. Not sure what these would do. Might the processor use these to sense the presence of the expansion module?
- There are two connections to VCC, two to GND, and one to the wall-wart DC IN via a diode.
- There is a connection to RESET*
- There are two pins that are not connected.
So I have a number of things on my TODO list.
- Figure out how to use EAGLE and make a schematic of the circuit as I understand it so far.
- See if I can figure out how the various ports are programmed on the Atmega. I should be able to use simavr for this. Some playing around earlier this week showed me how to load a piece of firmware into a simulated Atmega and have it run in single step mode.
- See if I can snoop the SPI traffic. That will likely have to wait until my Bus Pirate shows up. Learning how SPI works in the first place wouldn't hurt.