In order to select songs to play in the form of a playlist, this task can be accomplished through the OLED screen. Because the display screen uses the I2C interface, it can effectively save IO port resources. In addition, the display screen is wider than the usual OLED, and it is also easy to display the song name.
5.OLED screen display and menu selection
1) Complete the definition macros for 3 constant lights
2) Add relevant display functions
3) Complete the program flow modification as shown in Figure 23, and then regenerate the code. Due to the limitations of the compiler, the development process with EasyCode Magic Box has been completed. Later we will use KEIL to complete the subsequent processing.
Figure 23 Program flow
4) Use Keil to open the generated project file, and then modify the compilation mode according to Figure 24.
5) Reference the font header file in the program header
#include"codetab.h"
Figure 24 Modify the Keil compilation mode
5) Modify the main program content as shown in Figure 25, and then recompile. The compilation result is shown in Figure 26.
Figure 25 Main program content
Figure 26 Compilation results
6. Overall functional verification
When the OLED screen, MP3 player module and soft keys are connected, pressing K4, K1, K2, and K3 in sequence can realize song selection, play, stop and volume adjustment. The effects are shown in Figures 27 to 31.
Figure 27 Power-on effect
Previous article:Digital frequency meter based on 51 single chip microcomputer
Next article:STC15 series MCU RS-485 communication routine (with CRC check)
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
502 Bad Gateway
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications