## 1. Project introduction:
Make your own game console expansion board based on Lichuang Liangshanpai GD32F4 high-performance development board. It uses 2.4-inch LCD liquid crystal, transplants NES emulator, supports hundreds of nes games, onboard audio playback, and external expansion 3.5 mm headphone jack, using the joystick, learning the transplantation of the LCD screen of GD32F4, the use of the file system of the SD card, simple UI interface production, music output, etc.
## 2. On-board resource description
The game console expansion version resources include:
![1684547530401.jpg]
![1684547666868.png]
The expansion board adopts a separate design. The joystick and function buttons are separated from the motherboard. Later, other expansion boards can be added outside the motherboard. Such as a balancing car, etc.
## 3. Main learning content
1. Learning the Fats file system for SD cards and external Flash.
2. SPI serial LCD driver learning.
3. Transplant NES games and learn NES display modifications.
4. DAC audio output learning.
5. PWM driver learning.
7. Learning about SDRAM memory management.
8. ADC sampling learning.
9. Circuit schematic and PCB design, circuit welding learning.
## 4. Schematic design description
The schematic diagram is basically based on the Lichuang open source game console expansion board. Due to working hours, the power management module was deleted this time. The initial LCD display was planned to use the 5-inch RGB screen on hand, but the transplant failed. The game was later modified to a 2.4-inch SPI serial LCD. Later, when I had time, I continued to debug the RGB screen, added a BQ2057 fast charging circuit, used an 8.4V lithium battery, and used TPS561208 to design the 3.3V and 5V power supplies of the motherboard.
![1684549128206.png]
![20b0512346a117dbd76abd04b10358e.jpg]
## 5. Code description
The code part mainly designs the microcontroller pin assignment:
![1684550248883.png]