⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 这项工程将让您把自己的MP3播放器平台
💻 TXT
字号:
README.TXT for MP3 Player Firmware V037
COPYRIGHT (C) 2005 BY SPARE TIME GIZMOS


1 INTRODUCTION

  This distribution contains the source code for the Spare Time Gizmos' MP3
player project.  These file can be compiled with the free SDCC 8051 cross
compiler.

  If you just want to program your player and don't intend to modify the
source code, then we suggest that you download the binary only archive from
the Spare Time Gizmos web page

	http://mp3.SpareTimeGizmos.com

The binaries contained in that archive were generated by the Keil C51 compiler
and are smaller, faster and more responsive than the SDCC generated version.


2 THE TOOL CHAIN

  That said, though, the SDCC generated code does work and if you want to
to modify the source then this archive contains the Spare Time Gizmos
components that you'll need.  In addition to our files you'll also need a
copy of SDCC, which you can download from the Source Forge archive

	http://sdcc.sourceforge.net

  If you want to use the Makefile we supply, then you'll need some version
of the Make utility.  GNU Make works and you can obtain that from

	http://www.gnu.org/software/make/make.html

  Although you don't need it, we recommend the Programmer's Notepad IDE, which
can easily be set up to work with SDCC.  You can find Programmer's Notepad at

	http://www.pnotepad.org/

  And no matter what else you use you'll need the Flash Magic utility to
program the P89C66x microprocessor:

	http://www.esacademy.com/software/flashmagic/

  All these tools are free.


3 BUILDING WITH SDCC

  A Makefile is supplied with this distribution which automates most of
the work involved in building the firmware.  Assuming you've installed
all the necessary tools, you can simply type

  make

and it will compile, assemble, link and checksum a new firmware image.  The
result of all this is in the file FLASH.HEX, which you can then download to
your MP3 Player hardware using Flash Magic.

  Other useful targets included in the Makefile are:

  make install - download firmware using Flash Magic in batch mode
  make clean   - delete all generated files EXCEPT flash.hex
  make depend  - regenerate source file dependencies

  A Flash Magic command file, player.fms, is included so that you can
perform a complete erase, program and verify with a single command line

	fm @player.fms

This is the action performed by the "make install" command.  Note that the
player.fms file assumes your MP3 player serial port is connected to COM4 on
the PC, and also that you're using a P89C668 device.  If you're using another
port or MCU, you'll need to make the obvious edits to this file.


4 BUILD OPTIONS

  There are several build options defined near the top of the Makefile.  You
may change these to generate firmware for different configurations.  Here's a
brief summary of the build options:

  This line gives the version number of the firmware - this value will be
reported on the copyright screen when the firmware starts up.  You should
increment this value every time you make an edit to help you (and us!) keep
track of firmware changes.

	VERSION = 37

Note that the version number is DECIMAL, up to a maximum of 999.

  The following two lines determine whether you build the LCD or VFD version
of the firmware.  Uncomment one, AND ONLY ONE, of them.

	LCD = -DLCD
	#VFD = -DVFD

  You can uncomment the following line to build the debug version of the
firmware.  The debug version includes extra error checking and sends
debugging output in plain ASCII (19,200 baud 8N1) to the serial port.
Note that if you define DEBUG, the UART can't be used to send data to the
STA013 and YOU MUST SET FASTSDI = 0.  Otherwise the firmware will not work!

	#DEBUG= -DDEBUG

  Set FASTSDI to 1 to use the 8051's UART for sending serial data to the
STA013.  This is the usual case and is the way the "production" firmware
works.  Set FASTSDI = 0 to send data to the STA013 by "bit banging" two
port pins.  

	FASTSDI = 1

  If you set FASTSDI = 0 then your code can use the 8051's UART for another
purpose.  Notice that if you define DEBUG, then you MUST SET FASTSDI = 0 so
that the debugging code can use the UART.

  Also notice that which ever way you define FASTSDI, at run time you must
have the jumpers set accordingly so that the STA013 receives data from the
active source.  Refer to the article or the schematic for more details.

  Needless to say, the bit banged STA013 interface is quite a bit slower
than the hardware UART.  The FASTSDI=0 version can just barely play 128kbps
MP3 files; with FASTSDI=1 it will loaf along at 320kbps.

  The ROMSIZE parameter sets the size of the flash image.  This is used
for calculating the checksum of the firmware and doesn't have to be the
same as the actual physical flash size on the MCU.

	ROMSIZE = 32768


5 OTHER FILES

  The file printf_large.c comes from the SDCC distribution.  I've made a few
minor changes to it, particularly to support a precision specification for
string fields, and it's necessary to use this version with the MP3 player. 
These changes are all compatible with standard C and at some point they may
become part of the SDCC distribution.  This file was originally distributed
under the terms of the LGPL and its use here is consistent with that license.
In the interest of saving space I haven't included the entire SDCC source
code, however if you want it you can obtain it from the Source Forge URL
listed above.

  The program romcksum.exe is used to calculate the flash memory checksum
and store it in the image for the power on self test.  It isn't part of the
MP3 player and the sources for it aren't included here.


5 SUGGESTIONS FOR ENHANCEMENTS

  The firmware as released is pretty much the minimal set of functions
that we could get by with and still call it an MP3 player.  There are lots
and lots of areas that could be improved with just a little extra firmware.
If you can't think of any, then here are a few suggestions:

  FILE SYSTEM
  * Support FAT32
  * Support sub directories

  AUDIO
  * Add volume/balance/bass/treble controls

  PLAYBACK
  * There's an annoying "pop" when changing tracks
  * Add scan forward/backwards
  * Add shuffle play/repeat/A-B repeat
  * Support play lists

  DISPLAY
  * Support other display geometries (e.g. 2x40)
  * Support newer graphic VFDs (e.g. Noritake 7000 series)


6 SOURCE CODE LICENSE

  All the files in this distribution, except printf_large.c, are Copyright
2005 by Spare Time Gizmos.  All files except printf_large.c and romcksum.exe
are free software; you can redistribute them and/or modify them under the
terms of the GNU General Public License as published by the Free Software
Foundation.

  This firmware is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

  A complete copy of the GNU General Public License is contained in the file
LICENSE.TXT included with this distribution.  If it is missing you may obtain
a copy from the web page

	http://www.gnu.org/licenses/gpl.html


Spare Time Gizmos
Milpitas CA
www.SpareTimeGizmos.com
info@SpareTimeGizmos.com

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -