← All projectsCTYJul to Aug 2023
Breadboard Game Console
CTY, summer 2023
A breadboard circuit with an LCD that ran several games, played with push buttons.
At CTY in the summer of 2023 we built a game console on a breadboard: an Arduino Uno, a 16x2 character LCD and push buttons. It runs two games: Run, where you press a button to jump over the blocks coming at you, and Pong, where two players each get a button and a ball crosses the screen between them.
It was a long time ago and I no longer remember most of the details, so this page is built mostly from the footage.
From a drawing to a console
Before wiring anything, we drew the circuit in Fritzing: the Arduino, the LCD, the buttons and their resistors. The drawing also has a buzzer and a row of LEDs.
That evening it was on a full-size breadboard on a black base, with the Arduino Uno at one end and the LCD in the middle.
Run
A 16x2 character LCD has no pixels to draw with: the whole screen is 32 character cells. So in Run the player and the blocks are drawn in those cells, the blocks scroll in from the right one cell at a time, a button press makes the player jump, and the score takes the last few cells of a line and keeps counting.
The first version ran on a smaller breadboard. On the final board it sits behind the menu, next to Pong.
Pong
The first Pong just said PLAYER1 and PLAYER2. The final version turned it into a complete console. It opens on "Run or Pong?". For Pong, each player scrolls through a list of names and picks their own, the screen shows who is playing whom, and then "PING PONG, PRESS A BUTTON".
After every point it shows the score, at the end it shows "GAME OVER" and the winner, and "Show Score?" then lists how many games each player has won, adding up from game to game.
When it glitched
Problem A scrambled screen
Sometimes the LCD filled up with blocks and random symbols instead of the game. It is the one failure we caught on film.
The cause was a loose jumper wire on the breadboard. The screen is wired the usual Arduino way, in 4-bit mode: every character and every command goes over just four data wires in two halves, high half first, and the LCD takes in each half when the Arduino pulses its Enable wire. The two have to stay in step on which half comes next. A wire that is not pushed all the way into the breadboard can drop a pulse or add one, and from then on the LCD pairs up the wrong halves: every character and command after that is garbage, all over the screen, until the display is started over.
Calculation Why one bad pulse scrambles the whole screen
| Data wires in 4-bit mode | 4 (DB4 to DB7) | HD44780 datasheet, the usual controller on these screens |
|---|---|---|
| Bits in one character or command | 8 | same datasheet |
| Characters on the screen | 16 x 2 = 32 | our LCD |
- Transfers per character: 8 bits / 4 wires = 2, high half first, one Enable pulse each
- Filling the screen: 32 characters x 2 = 64 pulses, plus the commands between them
- Miss or add one pulse and each byte after it is the low half of one byte glued to the high half of the next
One glitch on a loose wire is enough to turn every character and command after it into a different one, which is why the whole screen goes, not just one letter.
From the datasheet's 4-bit transfer order; a counting argument, not a measurement of our board.
Fix Fixed
Seating the loose jumper firmly and restarting the board fixed it. The full demo we filmed after this clip runs for almost three minutes, through Run, a whole game of Pong and the score screen, without a scrambled character.
Why a 4-bit LCD falls out of step, and the usual fix (solid, short wires): bperrybap on the Arduino forum.







