The software at this stage contains routines for working with the NOKIA 3310 LCD display (and the standard butterfly display), communicating with the MP3 decoder, communicating with the MMC card and a basic FAT16 implementation. The FAT16 system will do long filenames and support direectories. If ID3 tags are available it will use this information instead of long file names.
Doxygen based documentation is now available online here
Basic operation of the MP3 player (version 0.6) is as follows:
Current consumption is now around 40mA - 50mA when playing at full volume. When idle the player can use around 20mA. With latest HW and firmware standby mode reduces current consumption to approx 1~2mA. With an 860mA Li-ION battery this translates to over 21 hours of playback.
The software has been expanded recently to include some new features. Some of those features are outlined below. The software can be configured for your hardware by changing defines in main.h and some other files.
Different LCD Types
The software can support different LCD options. To set the LCD screen use make LCD=DISPLAYTYPE clean all to build where DISPLAYTYPE is ALPHA, NOKIA or NO_DISPLAY for Orignal, Nokia 3310 and no display respectivly. An alternative wiring is supported through the NOKIA_ALTPINOUT defining in pcd8544.h.
The system now monitors the battery voltage (a wire needs to be connected from the "VoltageIn" at the top left of the butterfly to the battery connection). The system will not startup if the battery voltage is below a set value. The system will automatically save the player state and shut down if the voltage drops too low during playback. To disable this behavour comment out the definition of PWR_CHK_INTERVAL in main.h. If no MMC is inserted the current battery status is temporarily displayed on the Alphanumeric display. With the NOKIA display the battery charge is displayed as a small icon in the bottom right of the display. The exact battery levels can be set in power.h.
NOTE: The player will not startup if battery monitoring is enabled and the wire is not added between the voltage in and the battery.
Player State saving to EEPROM
When the battery voltage drops below the minimum voltage or the user forces the player into bootloader mode (press down twice while paused) then the current status of the player (play time, song, etc.) will be saved to the EEPROM. A high endurace routine was used so the eeprom should stand up to 10 times it's normal number of cycles. About 100,000 times total. When the player is woken from sleep or power down it will scan the MMC and then resume playing where it was last paused.
New visual feedback on the APLHA display including: Battery status, volume and player status. Feedback is displayed for STAT_DISPLAY_TIME seconds and then returns to the filename.
I have finally fixed the bugs in the filename routines and all long filenames should render correctly, with the exception of characters not possible to be displayed on the alpha numeric display.
Power down mode
The low power mode retains current player state in ram. You can switch the player into low power mode by pushing down on the joystick when paused or stopped. To wake the player up push up on the joystick. You can switch to bootloader mode by pushing down a second time once in low power mode. When entering bootloader mode the status of the player is written to eeprom.
Play all / repeat all
The player now wraps around to start or end of file list when manualy selecting songs. SCAN_JUMPTOSTART in main.h controls this behaviour.
Auto Power Down
The software will now automatically time out after 30 seconds when paused or stopped. The player will save the current state of the player resume later. After the last song the firmware will continue playing from the first song again. This can be changed in the file main.h
The auto power down now jumps to the low power mode rather than the bootloader. This saves eeprom usage and power.
The player now recognises and uses information from the ID3 version 2.x tags. If this information is unavailable then long filenames will be used.
Serial ControlThe player can also be controlled via the serial port using single character commands to emulate the joystick. The lowercase characters i,j,k,l represent up, left, down and right respectively. The spacebar (0x20) is used to represent a center push on the joystick.
The CVS is currently split into 3 branchs. The main trunk contains development for the MMC based player with a graphical LCD. The VANILLA branch contains development of the MMC Based player with a standard alphanumeric LCD. The ATA branch is used for the development of the HDD based player.
You can browse the current code through the CVS system here. It has some nice syntax highlighting and everything.
The Vanilla branch has been merged back into the main trunk with release 0.2
Each release will be tagged in the CVS as well as STABLE for the latest stable release. All hardware dependancies in the firmware will be dealt with using conditional compilation. All general defines discribing the hardware will be in main.h with a summary of other hardware options included in various other modules (vs1001.h, mmc.h, pcd8544.h).