Our project used two separate boards (The A3BU and an Arduino Uno) so we have seperate code for each device. Our game specific code lived primarily on the Arduino, which held the code for rendering the sprites in the game and updating their position on the screen. It was also used to communicate to the A3BU the status of the game (Active or Inactive).
The code for the A3BU was primarily the setup of an SPI Connection to the Arduino and establishing the proper setup for input detection on the pushbutton and at one point the joystick which unfortunately was unused in the final project due to hardware issues.
Our project consisted of the following hardware parts: the Xmega-A3BU microcontroller, an Arduino Uno, a thumb stick, a lcd screen from a Nokia 5110 and basic push button. The Arduino ran our game code and controlled the lcd screen, while the A3BU revived inputs form our controller. The A3BU and Arduino communicated via serial.
During our project we discovered that our thumb stick was not functioning properly. We believe the potentiometers were to blame for this. Due to this and limited time to order a new one, we decided not to have one.
Our original idea for the project was to create video game. Our original idea was to create this game by using the A3BU micro-controller along with a monochrome display and a joystick, push-button combo for the controls.
After hooking up the circuit as shown above, we realized that that A3BU controller was not actually compatible with the monochrome display. So we decided to use an Arduino to bridge the gap. (as shown below)