By Anthony Marino and Desmond Lee
In order to enable the portability of our blackjack game, we needed to design and build our own prototype board to support the Atmel 90S8515 and the other necessary hardware. In our design, we utilized both push buttons and a liquid crystal display to interface with the user.
Initially, we wanted to use a larger LCD that would support not only text, but graphics as well. However, because the code used to control this LCD was written completely in assembly, we had a hard time integrating this into our code. As a result, we decided to use the MDLS16264 LCD that we have been using throughout the semester. This display while not as elegant as the larger display, proved to be more than adequate for our needs. Due to the characteristics of both the 8515 and the LCD, we were able to drive the LCD directly from the port C pins of the MCU.
Using eight generic push buttons, we created simple way for the user to enter input to the game. The push buttons were wired to ground and pulled up through a 10K resistor. This creates a zero volt input to the 8515 when there is no push, and a five volt input when there is a button push. A software debouncing scheme, removed noise from the button pushes, and provided us with clean, usable inputs. The push buttons are connected directly to the port A pins of the 8515.
In creating our own prototype board, we hardwired the above hardware as described, and added several components to support the Atmel chip. Pins 18 and 19 of the 8515 were wired to an 8MHz crystal to provide a clock to the system. Both pins of the crystal needed to be grounded through 27 pf capacitors. Additionally, pin 20 of the MCU was connected to ground and pin 40 was connected to VCC. To power the circuit board we decided to use 4 AA batteries. We needed to connect two diodes in series to drop the voltage down to five volts so that the game would operate correctly. A toggle switch was used to turn the power to the circuit on and off.
The one hurdle we had to overcome came when we converted from the power supply power to battery power. Unexpectedly, the increase in voltage supplied to the MCU by the batteries caused the game to reset when a player chose to 'hit'. This error while still unexplained was fixed when two diodes were put in series, lowering the supplied voltage to the board to five volts.
(1) Atmel 90S8515 Microcontroller