[Gghc-discuss] More stuff on hardware design

Jonathan Manton jmanton at illinois.edu
Sun Apr 17 21:02:57 CDT 2011


It turns out we can't use I2C from the user's arduino to our electronics.  The I2C libraries take two of the analog I/O pins (I2C is implemented in hardware).  So if we use I2C, we lose 2 analog peripherals (probably the joystick).

Instead, I suggest we use the NewSoftSerial arduino library to connect the two arduinos (the user's one and the one we use to control the board).  The problem with this is we still have to talk to the LED controller somehow.  My suggested solution is that we lose two of the buttons up by the LCD.  Then the pin allocation on the target arduino will be (out of 32 I/O pins available):

2 for serial connection to talk to user arduino
2 for I2C to talk to LED controllers
13 to talk to graphics LCD
3 to talk to buttons next to graphics LCD
6 to control analog switch
12 to "switch" digital I/Os (6 LEDs, 4 buttons, joystick button, missile switch)

Uh oh, that's 38 I/Os.  Hm.  We would only have 30.


So, new plan, which actually simplifies things anyway.

We use a regular stock arduino for the control of the board.  It has 20 I/Os available.

2 for serial connection to talk to user arduino
2 for I2C to talk to LED controllers and I/O expander (see below)
13 to talk to graphics LCD

Then we use an I2C I/O port expander to control the 6 analog switch ports and to "switch" the digital I/Os.  We can use the 3 remaining pins to either control the buttons next to the graphics LCD (if we want 3), or use extra ports on the I/O expanders to control those buttons.

There are like tons of I2C I/O expanders.  But there is a tutorial on how to use the PCA9535 (or PCA9555) with an arduino (at http://www.neufeld.newton.ks.us/electronics/?p=241).  Those are 16-bit expanders.  So 2 of them will do.

So on the I/O expanders will be:
6 for analog switch
12 for switching user peripherals (6 LEDs, 4 buttons, joystick button, missile switch)


More information about the Gghc-discuss mailing list