## [Based on Lichuang Liangshan School] Exclusive game console design
### Circuit design
1. Power circuit design
By consulting the microcontroller design schematic diagram and chip manual, the Liangshan School microcontroller supports 5V power supply, and other chips and peripherals are compatible with 5V and 3V3 powered by. A 3.7V 800 mAh lithium battery is selected for power supply, and the LDO boost circuit is used to reduce the voltage to a suitable voltage. The battery management circuit and lithium battery charging circuit are used to power the entire game console system. The use of built-in battery power makes the game console portable and can be used anytime and anywhere.
![image-20230518162337827.png]

![image-20230518162415508.png]

![image-20230518162433280.png]

2. Screen driver circuit design
! [WeChat picture_20230518162616.jpg]

Use Jin Yichen 1.69-inch screen, give The screen uses ST7789V chip SPI driver, to use and develop, you only need to transplant the official case, and it is easy to use. The screen adopts 240*280 resolution, which has the characteristics of clear display, vivid colors and simple driving. Can be combined with the SPI protocol of the microcontroller for communication.
![image-20230518221220555.png]

3. The sound output circuit design
uses a headphone jack design and speaker output to not only meet the need for external sound amplification, but also can be inserted into a headphone cable. It is quiet and simple, and can be switched at any time. The circuit uses microcontroller DAC analog output, which is convenient and simple to drive.
![image-20230518221754766.png]

4. Direction control joystick circuit design
![WeChat picture_20230518162630.jpg]

Use the joystick button as the control device. This device feels good and has a beautiful appearance. Use potentiometers to simulate the x, y axes, and only need two ADC detections to drive it.
![image-20230518222344096.png]

5. Storage circuit design.
A good game console needs to have various types of games, and it needs sufficient memory support. EEPROM has the characteristics of large capacity, fast storage, and simple driver
![ image-20230518222627669.png]

6. Button circuit design
Design buttons, which are used to simulate action buttons in various games and realize function switching of game consoles.
![image-20230518222827716.png]

7. Vibration circuit design
realizes the feedback effect of the game console through a vibration motor.
![image-20230518222930943.png]

8. The power
supply of the power detection circuit is connected to the pins of the microcontroller through a resistor voltage divider to monitor the battery power through the ADC function.
![image-20230518223044014.png]

### Code debugging
- screen driver
- button
- spi, iic communication
- adc acquisition
- dac simulation output
### Actual picture
![189ff01b78ed955fb37a92f28d8416a.jpg]

![WeChat picture_20230520213159.j pg]

![WeChat picture_202305202131591.jpg]