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
- 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.
- 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).
- 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
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 :)