Hardware Design


Circuit Diagrams

            Our original code used the MEGA163, so we had to modify the code a bit to work on the MEGA32. So when the chip changed, we had to move around a bit of the hardware. And as previously mentioned, we moved the circuit from breadboard to soldier board once all the hardware problems had been ironed out. When all was said and done, the circuit diagram appeared as it does below:

Final circuit diagram

           The chip can be programmed on board via 6 controller pins connected to the STK board (which connect with pins 6 to 11 of the microcontroller). The Atari joystick controller connection is a bit more complicated. We needed a special D-type connector to attach our board up to the joy-pad; luckily, I had an old Compaq lying around the house with just the right adapter. In short, a 5 by 2 array of pins on the board (minus the 10th pin) plug into the adapter. The adapter has a D-type plug which the joystick plugs into. Below is the circuit diagram of the joystick:

Atari Joystick and D-type adapter schematics

        Note that the joystick is simply composed of switches connected to a common pin. This makes for a very easy integration with the microcontroller; each switch can by easily connected to a single pin of the microcontrollers port A and software polled when needed.

         Audio and video out circuitry is almost identical to the circuits used in previous labs with one exception; our audio circuit includes two sound generation paths (one for sound effects, and the other for music).

         The user can attach an external battery pack (4 size C batteries or AA) and switch the board on and off; a series LED signals the user of the on state and prevents blow-out of the microcontroller (by bucking the voltage down from 6V to the operational regime).

         Of course, we included the crystal circuitry and a hardware reset button.


Digikey Parts Ordered

SJ5514-0-ND (bumpons)
438-1019-ND (prototype board)
2478k-ND (4-“AA” battery holder)
AE8940-ND (microcontroller socket)
A23621-ND (DB9 socket hardware kit)
                                                        Total Cost: $11.59 (minus “free” Radio Shack board and parts lying around the lab)