Introduction: AVRelay - Self Programming Pocket AVR Game Console

About: I am 25 years old Polish "teen" (was... xD) :D I play electric guitar, like programming and arduino :)

I want to show you my project "AVRelay". It is a pocket mini AVR computer. It loads system on startup so you are able to load from SD card game or app. On video you can see older version of system, now it has GUI ;)

There are two Atmega328. First processor is called "SDLoader", second is main processor (it is connected to LCD and buttons). Both CPUs are connected via I2C (Wire Library) for communication and serial port to loading .HEX program from SD card through SDLoader to Main CPU. To code SDLoader I usedBootDrive project.

For example on startup SDLoader loads system program then user picks game. Name of this game is sending via I2C to SDLoader and it loads this game by serial :)

Video is in Polish (so you can translate it ;P).

Step 1: Part List:

  • double dip switch (power and sound on/off)
  • small potentiometer (for LCD backlight)
  • 6x tact switch
  • buzzer
  • 18650 cell (we need 4.2v - 3.6v)
  • SD card module
  • Nokia 5110 LCD
  • 2x 16Mhz crystal
  • 2x dip28 socket
  • 2x Atmega328P-PU
  • 2x universal plate (or make your own SMD ;))

  • male and female goldpin connectors (to construct console and optional external pinout)

And Arduino (UNO/MINI/LEO) to program CPUs of course (HOW to to this).
Hmm but if you want do this project on breadbord you can always use two Arduinos ;)

Step 2: Connection:

Buttons are connected using "Pull Up resistor" so we don't need external.

Main CPU:

  1. pin 0 - pin 1 SDLoader
  2. pin 1 - pin 0 SDLoader
  3. pin 2 - buzzer
  4. pin 3 - LCD CLK
  5. pin 4 - LCD DIN
  6. pin 5 - LCD DC
  7. pin 6 - LCD RST
  8. pin 7 - LCD CE
  9. pin 8 - A BUTTON
  10. pin 9 - B BUTTON
  11. pin 10 - UP BUTTON
  12. pin 11 - DOWN BUTTON
  13. pin 12 - RIGHT BUTTON
  14. pin 13 - LEFT BUTTON
  15. pin A4 - pin A4 SDLoader
  16. pin A5 - pin A5 SDLoader
  17. RESET - pin 6 SDLoader & by 470 resistor to 5v
  18. AND 16Mhz CRYSTAL!

Pins: A0, A1, A2, A3 are free (they can be used for external modules).

SDLoader CPU:

  1. pin 0 - pin 1 Main CPU
  2. pin 1 - pin 0 Main CPU
  3. pin 6 - RESET Main CPU
  4. pin 10 - SD CS
  5. pin 11 - SD MOSI
  6. pin 12 - SD MISO
  7. pin 13 - SD SCK
  8. AND 16Mhz CRYSTAL!
  9. RESET - by 470 resistor to 5v


Backlight pin by potentiometer to 5v.


Through dip switch to pin 2 Main CPU.

Optional: by led to RX or TX if you want hear booting ;)

Step 3: Thats All!

I am using THIS LCD library.

HEX files of yours programs are crated every time when you click "upload code to arduino". They are in temp folder. More about this HERE! :)

I hope that I helped in something and that you like my project :)

Thats my first bigger DIY, thanks for reading :)

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest