Chinese menu MP3 song selector based on SC95F8616 microcontroller (2)

Publisher:喜悦的38号Latest update time:2020-08-08 Source: 51heiKeywords:SC95F8616 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

3.Key recognition

Since the key recognizes the low level of the corresponding scan, P07 is set to output a low level.

1 ) Complete the program flow modification as shown in Figure 16 and make corresponding configuration modifications.


Figure 16  Program flow


          

Figure 17  Modify configuration


2 ) Click  “ Generate Project Source Code ” to generate the project code ,  and its main program is shown in Figure 18 .

Figure 18  Generated main program


3 ) After compiling and downloading the program, press the K1~K4 keys in sequence, and the output result is shown in Figure 19 .

Figure 19  Key value output


4.MP3 audio module control

The MP3 audio module is a functional module controlled by serial communication. It can achieve the purpose of selection and control by cooperating with buttons.

The main commands for controlling MP3 are: play command, stop command and volume adjustment command. For easy control, they can be placed in array variables.

1 ) Add an array variable to store instructions

2 ) Add playback processing function

3 ) Complete the program flow modification as shown in  Figure 20 and reconfigure as shown in Figure 21 .

Figure 20 Program flow


                                     

Figure 21  Update related configuration


4 ) After compilation, the result is shown in Figure 22

Figure 22 Compilation results


5 ) After downloading the program, press K1 , K2 , and K3 keys in sequence to play, stop, and adjust the volume of the song respectively. The output content is shown in Figure 23 .

When the MP3 player module is connected , the control effect can be heard.

Figure 23 Operation effect


Keywords:SC95F8616 Reference address:Chinese menu MP3 song selector based on SC95F8616 microcontroller (2)

Previous article:51 MCU serial port receiving and sending string source program
Next article:Application of MAX7219 serial input and output common cathode display driver

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号