---
title: "AVR Pong Game"
description: "Programming an ATmega328P microcontroller"
type: project
stage: completed
published: 2025-07-15
updated: 2026-08-03
language: en
canonical_url: https://hcenteno.com/projects/avr-pong-game
repository: https://github.com/centenohugo/AVR-Pong-Game
live_url: https://pong.hcenteno.com/
---

# AVR Pong Game

> Programming an ATmega328P microcontroller

This project recreates the game Pong by programming it directly on a ATmega328P microcontroller using C++.
Doing this project was really satisfactory, as it was my first experience programming hardware. I came up with it as my final project for the subject EE 120B.

[*Play it here!*](https://pong.hcenteno.com/)

The approach was to design the logic of each component separately as a state machine and then implementing all together. The logic diagram of the final implementation was the following:


![](https://z6gxxuaqfdaeosqf.public.blob.vercel-storage.com/projects/04c9ccc2-542b-401a-8a25-1054e1d87636/taskdiagram-Q8NM5rqBeppjCxsfsVElCSk1HI5y7W.webp)


- ### Hardware components used
    -Arduino UNO R3 Controller Board (ATmega328P microcontroller)

    -ST7735 LCD  (used as primary screen)

    -LCD 1602 (used as secondary screen)

    -x2 Joysticks

    -Button

    -Resistance 10kΩ
- ### Wiring Connections
    - ST7735 LCD
    
            CS: D10
            RESET: D9
            A0: D8
            SDA: D11
            SCK: D13
            LED: 3.3V
    - LCD 1602

            V0: potentiometer (10 - 100 kΩ)
            RS: D2
            RW: GND
            E: D3
            D4: D4
            D5: D5
            D6: D6
            D7: D7
            A: 5V
            K: GND 

    - Joystick P1: A0

    - Joystick P2: A1

    - Button: A2

https://www.youtube.com/watch?v=m41cJiF4xiA
