Difference between revisions of "Microduino-Module Audio"
From Microduino Wiki
(Created page with "{{Language|Microduino-Audio}} {| style="width: 800px;" |- | 400px|thumb|right|Microduino-Audio Microduino-Audio is the audio play module ba...") |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
==Features== | ==Features== | ||
− | * | + | *Adopt serial port control with default serial 1. Serial port can be selected by jumpers: Serial 0, soft serial port(D4, D5) |
*Allow external memory card connection and play as well as disk display while connecting with a computer and content update. | *Allow external memory card connection and play as well as disk display while connecting with a computer and content update. | ||
− | *Sleep mode serial port setting and low power consumption. | + | *Sleep mode serial port setting and low power consumption. |
+ | |||
==Specification== | ==Specification== | ||
* MP3 format: | * MP3 format: | ||
Line 24: | Line 25: | ||
**Normal, Jazz, Classic, Pop and Rock supportable | **Normal, Jazz, Classic, Pop and Rock supportable | ||
*Support asynchronous serial communication mode and receive commands sent from the upper computer by serial port: | *Support asynchronous serial communication mode and receive commands sent from the upper computer by serial port: | ||
− | **Communication standard: 9600 bps | + | **Communication standard: 9600 bps |
**Data bit:1 | **Data bit:1 | ||
**Check bit:none | **Check bit:none | ||
Line 39: | Line 40: | ||
==Development== | ==Development== | ||
− | * | + | *Dial wheel button control |
− | **Hardware | + | **Hardware needed: [Microduino-Core+]], [[Microduino-USBTTL]],[[Microduino-Amplifier]], Microduino-Audio, Audio-KEY-SD, two loudspeakers and power supply (1A or higher) or [[Microduino Extension Boards]]; |
− | **Connect Microduino-Audio | + | **Connect your PC with Microduino-Audio and write audio file into flash, which can refer to document structure; |
− | **Stack Audio-KEY-SD | + | **Stack Audio-KEY-SD. Meantime, Microduino-Audio's microUSB interface is not directly connected with the computer. You need to change another power supply so as not to recognize the driver and fail to play music. Please make sure the current should be 1A or higher, otherwise, it may cause music play failure due to undercurrent. Or you can use microUSB on Microduino extension module to supply power. |
− | + | **Start Arduino IDE and open example program. | |
− | * | + | Program description: "arduino.h" is audio control file. |
− | + | 1. Under default serial port, you can select serial port in "arduino.h" based on your core module. | |
− | + | <source lang="cpp"> | |
− | + | #define AUDIO_PORT Serial1 //Core+ | |
− | + | //#define AUDIO_PORT mySerial //Core | |
+ | </source> | ||
+ | 2. Initialize Audio module and you can choose where to start the music. | ||
<source lang="cpp"> | <source lang="cpp"> | ||
+ | #define DEVICE_Flash 5 | ||
+ | #define DEVICE_TF 1 | ||
+ | </source> | ||
+ | If you want to play Flash, please initialize: audio_init(DEVICE_Flash,MODE_loopOne,music_vol); | ||
− | + | 3. Initialize Audio module and choose play mode. | |
− | + | <source lang="cpp"> | |
− | + | #define MODE_loopAll 0 | |
− | + | #define MODE_loopOne 1 | |
+ | #define MODE_One_STOP 2 | ||
+ | #define MODE_One_END 4 | ||
+ | </source> | ||
− | + | **Select Microduino Core+ (Atmega644P@16M,5V) as the board cad, download to core board with Microduino-USBTTL after compiling; After the download, dial the wheel left and right, you can choose the music. | |
− | + | *Serial port structure controls music from memory card. | |
− | + | **Connect Microduino-Audio to your PC with USB cable, you can find two disks including one MP3's flash and one memory card. | |
− | + | **Open memory and create a folder, which has to be named among the range of 01, 02…………99. Save music into this newly created folder and name the music file among the range of 001, 002,003………999. | |
− | + | **Define the initialization to be music from TF: audio_init(DEVICE_TF,MODE_loopOne,music_vol); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Application== | ==Application== | ||
Microduino-Audio is widely used in various kinds of voice broadcast: | Microduino-Audio is widely used in various kinds of voice broadcast: |
Latest revision as of 04:03, 4 August 2017
Language: | English • 中文 |
---|
Microduino-Audio is the audio play module based on JQ6500 serial port MP3 chip, which together with Audio-KEY-SD can play flash music by thumbwheel switch control and with Microduino core module can send serial port commands to control the system.
ContentsFeatures
Specification
DocumentJQ6500 sound chip description: File:JQ6500.pdf Development
Program description: "arduino.h" is audio control file. 1. Under default serial port, you can select serial port in "arduino.h" based on your core module. #define AUDIO_PORT Serial1 //Core+
//#define AUDIO_PORT mySerial //Core 2. Initialize Audio module and you can choose where to start the music. #define DEVICE_Flash 5
#define DEVICE_TF 1 If you want to play Flash, please initialize: audio_init(DEVICE_Flash,MODE_loopOne,music_vol); 3. Initialize Audio module and choose play mode. #define MODE_loopAll 0
#define MODE_loopOne 1
#define MODE_One_STOP 2
#define MODE_One_END 4
ApplicationMicroduino-Audio is widely used in various kinds of voice broadcast:
PurchaseHistoryPictureFrontBackVideo |