# iRhythm Internet MP3 Radio
This appilcation is a prototype of **Internet Radio** designed on ARC EM Starter Kit,which could find music from online audition websites,like *douban FM*,*Baidu FM*,*KuWo*,Download mp3 file among the music,and decode them by using **ARC DSP Instruction** and **optimized code** for mp3 decode.By adding a I2S peripheral with a **FPGA**,song can be sent out and outputted from two **speaker**.
-----------------------------------------
* [Introduction](#Introduction)
- [Function](#function)
- [System Architecture](#system-architecture)
- [Appearance](#appearance)
- [Video](#video)
* [Hardware and Software Setup](#hardware-and-software-setup)
- [Required Hardware](#required-hardware)
- [Required Software](#required-software)
- [Hardware Connection](#hardware-connection)
* [User Manual](#user-manual)
- [Before Running This Application](#before-running-this-application)
- [Run This Application](#run-this-application)
-------------------------------
## Intruduction
iRhythm is a Internet Radio,which can download music from online audition websites,decompress the file and play,while the music file in SD card can also be decoded and played.
With the help of a FPGA, the digital music data in SPI format can be converted into I2S format,which can be recognize by audio D/A convertor.
Through an amplifier outside,the online music can be play out from two big speaker.And it's a really good feeling!
### Function
* Online Music Crawling and Download
* Decode Mp3 file
* Protocol transit form SPI to I2S
* Power Amplification
* Performance data display
### System Architecture
![System Architecture][1]
### Appearance
* **System Top View -- Control Part**
![Control Part][2]
* **System Middle View -- Signal Processing Part**
![Signal Processing Part][3]
![Signal Processing Part][4]
* **System Bottom View -- Output Part**
![Output Part][5]
* **System View**
![iRhythm][6]
### Video
[ iRhythm demo video ][7]
## Hardware and Software Setup
-------------------------------
### Required Hardware
* Necessary Hardware:
- DesignWare ARC EM Starter Kit(EMSK) *1
- SD card *1
- ESP8266 *1
- Cmod A7 XC7A35T FPGA develop board *1
- Pmod I2S *1
- OLED(12864) *1
- Headphone *1
![Necessary Hardware][8]
--------------------------------
* Additional Hardware:
- Lipo Battery *1
- Buck power regulator *2
- Audio Amplifiers *1
- Speaker *1
![Additional Hardware][9]
---------------------------------
### Required Software
* embarc_ops **newest** commit:976b8ed3b24b061df91f78bcc71a726dd2a63fae
* Metaware or ARC GNU Toolset
* Serial port terminal, such as putty, tera-term or minicom
* Any bitstream file can config your FPGA as a SPI to I2S protocol interface
* More than one MP3 file in SD card to avoid waiting while downloading
### Hardware Connection
1. Insert your SD card with mp3 file in it.
2. Make sure all your module has been mounted on the board.
3. Make sure your power regulator connect is correct,including the voltage and polarity, or the prototype may be damaged
4. Connect your 3.5 inch Audio cable.
5. After all connector has been connected correctly,connect the Li-po battery to power up the design.
## User Manual
### Before Running This Application
* Download source code of iRhythm from github.
* Download ./doc/spi2i2s.bit,which is the bitstram file of Cmod A7 to extend a i2s peripherals
* Make sure all connection is correct again.
* Make sure iRhythm is in the Wifi environment,which is matching with the setting in the code,including wifi name and wifi password.
* Check the switch 1 and 2 of EMSK are in off state to boot as ARCem_7d core.
### Run This Application
* Download with USB-JTAG or use bootloader to boot the program.
* After iRhythm connect the wifi,initialization will complete very fast and OLED may light to show the song reading from SD card.
* After that song can be heard from the speaker and OLED shows download speed and decode speed.If not,try to rotate the volume bar to increase the volume.
* the user can control with the key any time.
#### Makefile
- Selected FreeRTOS here, then you can use [FreeRTOS API][10] in your application:
>> # Selected OS
>> OS_SEL ?= freertos
- Target options about EMSK and toolchain:
>> TOOLCHAIN=gnu
>> BOARD=emsk
>> BD_VER=23
>> CUR_CORE=arcem7d
- The relative series of the root directory, here the path of the Makefile is `./embarc_osp/application/iRhythm/makefile`:
>> #
>> # root dir of embARC
>> #
>> EMBARC_ROOT = ../..
- Directories of source files and header files, notice that it **is not recursive**:
>> # application source dirs
>> APPL_CSRC_DIR = ./src/GUI ./src/MUSIC ./src/MUSIC/mp3_dec ./src/MUSIC/mp3_dec/mp3_Ori ./src/MUSIC/mp3_dec/mp3_Dsp ./src/HW_ASSI ./src/NET ./src/NET/esp8266_wifi ./src/TASK
>> APPL_ASMSRC_DIR = .
>> # application include dirs
>> APPL_INC_DIR = ./inc ./inc/mp3_dec
>> APPL_DEFINES =
- Directories of Linker Script File,to use CCM
>> # linker script file
>> LINKER_SCRIPT_FILE ?= linker_file.ldf
>>
See [ embARC Example User Guide][11], **"Options to Hard-Code in the Application Makefile"** for more detailed information about **Makefile Options**.
#### GUI
Placing the GUI source code in `src/GUI` folder.
Placing the C source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| gui.c | gui control reflash |
| key.c | key interrupt callback |
#### HW_ASSI
Placing the HW_ASSI source code in `src/HW_ASSI` folder.
Placing the C source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| dma2spi.c | dma configuration for spi |
| iosignal.c | IO initialization |
| mem.c | SD file read |
#### MUSIC
Placing the MUSIC source code in `src/MUSIC` folder.
Placing the C source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| mp3_dec/ |walkgeek library for mp3 decode|
| filelist.c | api for link list control |
| mp3api.c | top lever Api of mp3 decode |
| music.c | music task top lever api |
#### NET
Placing the NET source code in `src/NET` folder.
Placing the C source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| esp8266_wifi/ | control api for ESP8266 |
| net.c | api for net task |
#### TASK
Placing the TASK source code in `src/TASK` folder.
Placing the C source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| GUI_task.c | main function of gui task |
| MUSIC_task.c | main function of mussic task |
| NET_task.c | main function of net task |
| main.c | start application |
#### INCLUDE
Placing the INCLUDE source code in `inc` folder.
Placing the HEADER source file.
| folder/file | Function |
| ------------------- | ------------------------------|
| mp3_dec |walkgeek library for mp3 decode|
|at_parser.h/esp8266.h| control api for ESP8266 |
| include.h | all declaration of c file |
| perform.h/inc_task.h| api for debuging |
| FreeRTOSConfig.h | configuration of ROTS |
| ssd1306_app_conf
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
全国大学生电子设计竞赛(National Undergraduate Electronics Design Contest),试题,解决方案及源码。计划或参加电赛的同学可以用来学习提升和参考。程序均是实战案例,经过测试可直接运行。 全国大学生电子设计竞赛(National Undergraduate Electronics Design Contest),试题,解决方案及源码。计划或参加电赛的同学可以用来学习提升和参考。程序均是实战案例,经过测试可直接运行。
资源推荐
资源详情
资源评论
收起资源包目录
2018 Synopsys ARC杯电子设计竞赛项目——iRhythm.zip (116个子文件)
spi2i2s.bin 2.09MB
spi2i2s.bit 2.09MB
hufftabs.c 41KB
imdct.c 27KB
oledfont.c 23KB
fft_tab.c 21KB
huffman.c 16KB
mp3dec.c 15KB
bitstream.c 14KB
trigtabs.c 14KB
scalfact.c 13KB
fft_list.c 12KB
net.c 12KB
dqchan.c 12KB
esp8266.c 12KB
oled.c 10KB
stproc.c 10KB
dct32.c 10KB
mp3tabs.c 7KB
dequant.c 6KB
polyphase.c 6KB
mp3api.c 6KB
dma2spi.c 6KB
buffers.c 5KB
iosignal.c 5KB
at_parser.c 5KB
fft.c 4KB
music.c 4KB
main.c 4KB
subband.c 4KB
gui.c 2KB
key.c 2KB
filelist.c 2KB
mem.c 1KB
NET_task.c 1KB
GUI_task.c 419B
MUSIC_task.c 303B
华智队技术报告V4-1.docx 3.7MB
.gitignore 83B
Dsp_assembly.h 28KB
coder.h 11KB
FreeRTOSConfig.h 6KB
mp3common.h 4KB
fft.h 4KB
mp3dec.h 4KB
statname.h 3KB
include.h 3KB
at_parser.h 3KB
esp8266.h 2KB
oled.h 1KB
inc_task.h 813B
perform.h 404B
boot.hex 905KB
IMG_20180520_195249.jpg 3.07MB
IMG_20180520_195003.jpg 2.83MB
IMG_20180520_195309.jpg 2.81MB
IMG_20180520_194956.jpg 2.79MB
mid.jpg 2.79MB
IMG_20180520_195550.jpg 2.74MB
IMG_20180520_195056.jpg 2.71MB
IMG_20180520_195546.jpg 2.59MB
bottom.jpg 2.54MB
作品图5.jpg 2.54MB
IMG_20180520_195138.jpg 2.43MB
IMG_20180520_191642.jpg 2.36MB
main1.jpg 1017KB
作品图1.jpg 1017KB
main2.jpg 896KB
作品图2.jpg 896KB
main3.jpg 723KB
作品图3.jpg 723KB
top.jpg 115KB
作品图4.jpg 112KB
mid2.jpg 97KB
EMSK.jpg 50KB
linker_file.ldf 2KB
LICENSE 11KB
makefile 1KB
Readme.md 9KB
华智队技术报告V4-1.pdf 2.42MB
华智队作品展示PPT.pdf 1.42MB
iRhythm硬件图纸.pdf 471KB
2017+Synopsys+ARC+杯海峡两岸电子设计竞赛_李锐戈.pdf 185KB
2018+Synopsys+ARC+AioT+Design+Contest_李锐戈.pdf 185KB
necessaryhw.png 468KB
addhw.png 454KB
Pmod_I2S__75529.1456866608.1280.1280.png 306KB
TIM截图20180519152019.png 305KB
TIM截图20180519151833.png 291KB
Cmod_A7-obl-600__50330.1466199115.1280.1280.png 250KB
TIM截图20180519153319.png 163KB
TIM截图20180519153704.png 134KB
TIM截图20180519154705.png 129KB
功放图.png 122KB
TIM截图20180520150323.png 120KB
音乐波形.png 92KB
sysarch.png 74KB
Music task.png 39KB
MP3播放链表.png 38KB
TIM截图20180520143536.png 37KB
共 116 条
- 1
- 2
资源评论
白话机器学习
- 粉丝: 8216
- 资源: 7687
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功