Remote-Controlled MP3
Description: MP3 Design from scratch using LPC1768 micro-controller. Used protocal: SPI and UART.
Github: https://github.com/KyleChenZ/Mp3_Decoder_VS1053_for_LPC17xx
Hardware Description:
- LPC1768 (SJSU edition)
- IR sensor
- SD card
- VS 1053B (MP3 Decoder)
- Remote Control
- serLCD v2.5 (LCD Display)
MP3 Decoder Pin Description:
- SPI Protocol (MISO, MOSI, CS, SCLK)
- Dreq
- XDCS
- Pins for speaker
- LOUT
- AGND
- ROUT
Display Hardware Description:
- 16x2 display
- UART Protocol
- 3 Pins needed: VDD, GND, RX
- Software functionalities: Displays song name and info
MP3 Transfer Algorithm
Setup:
- Scan and store all the mp3 file paths
- Software reset for the decoder
- Configure SCI Mode register to set SPI mode
- Configure SCI Audata register to set audio samplerate
- Configure SCI Clock register to set clock frequency
Transfer Data:
- Open a file using fopen(path[songIndex], “r”)
- Read the file from SD card and send data to the decoder’s SDI register
- Keep sending data to play the song
- Meanwhile, receive control signal
LCD Display Info:
Display Algorithm:
- Display Buffer:
- 2 char array that each contains 16 characters, corresponding to each display grid on the screen.s
- Update()
- Updating the display’s
- VolumeChange()
- Update the display buffer to display volume and the current state of volume
- ScrollView()
- If the song name is too long, the ScrollView will display the song name by shifting left.
Instructions on Using the Mp3 Player:
Select/Menu Mode:
- Preview other songs
- Press OK to play the song that you are previewing
Main Tasks:
References:
https://www.sparkfun.com/datasheets/Components/SMD/vs1053.pdf
http://socialledge.com/sjsu/index.php/Main_Page
https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF