Introduction: AVRelay - Self Programming Pocket AVR Game Console
Hi!
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:
- pin 0 - pin 1 SDLoader
- pin 1 - pin 0 SDLoader
- pin 2 - buzzer
- pin 3 - LCD CLK
- pin 4 - LCD DIN
- pin 5 - LCD DC
- pin 6 - LCD RST
- pin 7 - LCD CE
- pin 8 - A BUTTON
- pin 9 - B BUTTON
- pin 10 - UP BUTTON
- pin 11 - DOWN BUTTON
- pin 12 - RIGHT BUTTON
- pin 13 - LEFT BUTTON
- pin A4 - pin A4 SDLoader
- pin A5 - pin A5 SDLoader
- RESET - pin 6 SDLoader & by 470 resistor to 5v
- AND 16Mhz CRYSTAL!
Pins: A0, A1, A2, A3 are free (they can be used for external modules).
SDLoader CPU:
- pin 0 - pin 1 Main CPU
- pin 1 - pin 0 Main CPU
- pin 6 - RESET Main CPU
- pin 10 - SD CS
- pin 11 - SD MOSI
- pin 12 - SD MISO
- pin 13 - SD SCK
- AND 16Mhz CRYSTAL!
- RESET - by 470 resistor to 5v
LCD:
Backlight pin by potentiometer to 5v.
Buzzer:
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 :)
Attachments

Participated in the
Arduino All The Things! Contest
11 Comments
Question 3 years ago
If I make some necessary changes in the code, can I replace the main cpu with an Arduino or even an esp32?
Answer 3 years ago
Atmega328 is in Arduino UNO so it is the same :D
Esp32 will not work out of the box.
Reply 3 years ago
Thanks a ton! Btw, do you know the changes necessary to add an esp32?
Reply 3 years ago
I am afraid I can't help you with esp32 :/ It is very old project and I don't have experience with ESP.
7 years ago
WHY DIDNT YOU USE SPI FOR THE 5110,?
Reply 7 years ago
Couse it is conflicting with SDcard reader :)
7 years ago
NICE PROJECT PAL ;-)
7 years ago
I waited a long time for a project like that. Shame for me i didn't did that :P
pokulan++ za bycie polakiem. Geszyly geszyly geszyly gek.
7 years ago
Nice.
7 years ago
Very cool project!
Reply 7 years ago
Thanks :)