Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Small MP3 player on AT91SAM7S256

Status
Not open for further replies.

Vermes

Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Activity points
22,318


It is a design of home made small MP3 player based on microcontroller AT91SAM7S256.

Specifications:
  • SD card support with files FAT32 system
  • reading long names of files and subdirectories (up to 80 characters)
  • possibility of exchange any files with a computer through USB (MP3 player is recognized by the computer as Mass Storage Device)
  • powered from an accumulator NiMH AA/R6
  • time of operation while powered from the accumulator (2450mAh): approximaetly 10-11hours
  • possibility of charging the accumulator through USB or 5V/500mA charger
  • possibility of programming and debugging through a „mini” JTAG connector with used only signals: SRST, TDO, TCK, TDI, TMS and GND and Vcc, which allows you to use HEADER bus 2x5 pin instead of 2x10 pin
  • user interface: 2x16 LCD, 5 backlit buttons (4 control and 1 turning on the supply) and 2 LEDs
  • playback of MP3 VBR and CBR files, 128...320kb/s, fs=44,1kHz and 48kHz
  • dimensions of the player: 84x60x22mm
  • weight: 105g

The player uses library of MP3 decoder from Atmel design „AT91SAM Internet Radio” - PDF and source code can be found HERE. USB support was based on file CDC_ENUMERATE.C from archive at91sam7s_usart_usb_20080916.zip.

The principle of operation:
After turning on the supply, the name of partition (Volume Label) is displayed on the LCD for 2 seconds. In case of SD card it would be the name of the producer of a card. After that time, when there is not USB connected, a list with content of the main calatog of the card will be displayed on the LCD. Sorting consists of displaying firstly the subdirectory name and then the file names. Thus, subdirectories are displayed in that list in the same order in which they are stored on the card. The same applies to the files. You can scroll the list using scroll/volume regulation buttons up and down. Always only the first position on this list is active, ie it is selected from a subdirectory by play/enter/exit button. The way of moving the list is similar to Windows Commander. All files from selected catalog are played, starting from the selected file to the end of the list. While playing, long name of played file is displayed together with the current time of a track, total time and bitrate. To fit such amount of information on 16 characters LCD display, automatic scrolling during playback was applied in this project. When the playback is over, the player goes back to displaying list of subdirectories and files in currently chosen subdirectory.

Accumulator energy saving functions:
  • blanking the LCD and buttons backlight after 20 seconds from recognizing the lack of activity of buttons. Pressing any of the four control buttons brightens up the backlight again;
  • turning off the player, when it displays only a list and does not play for 2 minutes
  • in case of lack of SD card in the slot when the player is turned on, displaying appropriate message for a few seconds and playing warning sound, and then turning off the player. The same is in the case of removing the card while playing music;
  • using the lowest possible frequency of clocking the microcontroller; 45,1584MHz at playing files with fs=44,1kHz and 49,152MHz at playing files with fs=48kHz

There is also measurement of accumulator voltage while operation of the player (without working with a computer). Voltage of the accumulator is measured by A/D converter inside the microcontroller. When votlage of the accumulator drops to 1V, warning sound is played, appropriate message dispalyed on the LCD, and then the player is turned off. Schematic diagram and PCB were made in Protel 99.

Program was written in C in Rowley Crossworks ver. 1.7. Microcontroller was programmed by JTAG using Macraigor Wiggler.

During compiling, set those options:
  • Optimize for Size
  • Heap size to 23918 bytes
  • Stack size (IRQ mode) to 384 bytes
  • Stack size (User/System mode) to 1024 bytes

Program takes 93kB of Flash memory and 36kB RAM. All functions are in Flash.



Link to original thread (useful attachment) - Mały odtwarzacz MP3 na AT91SAM7S256
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top