?? hardware details.mht
字號:
seek very little. I can highly recommend the Western Digital =
=93Caviar=94 series of=20
drives with the 8 MB cache. Note that the Caviar line has models with =
both 2 MB=20
and 8 MB of cache; if you=92re buying a drive for this player then get =
the 8 MB=20
cache version. I=92ve tested drives between 1 GB and 120 GB on the =
player. I=92ve=20
not tried drives larger than 120 GB. I know that the player won=92t =
recognise=20
capacities beyond 137 GB so I suggest you limit yourself to 120 GB =
maximum.=20
That=92s a lot of MP3=92s!</P>
<P>If you=92re re-using an existing drive, be aware that the player =
requires a=20
FAT32 filesystem on the drive. As an example, if you=92ve taken a drive =
from a=20
WinNT system it=92ll likely be formatted for NTFS so you=92ll need to =
reformat it.=20
(WinNT, XP, Linux, etc do recognise FAT32 drives however, making this a =
good=20
generally-compatible file system.) OS=92s such as Win98, WinME will =
format FAT32=20
by default.</P>
<P> </P>
<H3>Debug Port</H3>
<P>The second UART port on the AVR is routed through an RS-232 level =
converter=20
to a female DB9 connector on the board. This is the debug port, and with =
a=20
standard straight-through 9-pin serial cable can be connected to a PC =
runnning=20
HyperTerminal or some such terminal program to display debug messages. =
Set the=20
terminal program to 19200 baud, 8 bit data, 1 stop bit, no parity.</P>
<P>The debug port doesn't do a huge amount functionality-wise. Its =
primary use=20
is for spitting out debug messages during software development. Being =
able to do=20
this is of great help during any code development. There is a simple =
debug menu;=20
pressing the "?" key on an attached terminal will bring up a list of =
available=20
commands. </P>
<P> </P>
<H3>LCD Display and Push-Buttons</H3>
<P>This is Paul=92s display and pushbuttons, from:<BR><A=20
href=3D"http://www.pjrc.com/store/mp3_display.html"=20
target=3D_top>http://www.pjrc.com/store/mp3_display.html</A> </P>
<P>This is a very attractive unit for a number of reasons. First of =
which is=20
that it=92s readily available; you can buy them right off his website. =
There are=20
two versions; one with backlighting and one without. Either will work on =
this=20
player. This player has a connector on the board for the backlighting =
(J10)=20
which you can use as required to provide a software-switched 12V to =
power the=20
backlight. Note that the backlight from Paul doesn=92t have a power =
connector on=20
it; I=92d suggest you put a simple 2-pin connector on the wires to make =
it easy to=20
plug into and out of this board. But you can just solder it straight =
into the=20
PCB if you wish. The kit I supply contains a 2-pin male and female =
connector=20
pair for this purpose. If you can't decide which display to buy, get the =
backlit=20
one; it looks better in use.</P>
<P>The display and pushbuttons have a simple RS232 interface. The first =
UART=20
port on the AVR passes through an RS232 level converter and then to =
connector=20
J11 to connect to the display & buttons. Displaying characters on =
the=20
display is accomplished by sending it commands. When a button is pressed =
by the=20
user it sends back commands to the AVR. The protocol is described =
at:<BR><A=20
href=3D"http://www.pjrc.com/tech/mp3/lcd_protocol.html"=20
target=3D_top>http://www.pjrc.com/tech/mp3/lcd_protocol.html</A> </P>
<P>With the backlighting on, or in a well-lit room, the decent size of =
the=20
display characters allows viewing of the screen from a distance. It=92s =
very=20
suitable for a shelf-mounted player of this type.</P>
<P> </P>
<H3>STA013 MP3 Decoder & Audio Output </H3>
<P>If the AVR is the heart of the player, then the STA013 is its soul. =
This chip=20
is streamed an MP3 file, and it performs the decoding of the file, =
generation of=20
the clocks and data signals for the stereo DAC, all with minimal =
supervision.=20
Paul has written an excellent description of this chip <A=20
href=3D"http://www.pjrc.com/tech/mp3/sta013.html" =
target=3D_top>here.</A> ST's=20
website for the chip, including the datasheet, is found <A=20
href=3D"http://us.st.com/stonline/prodpres/dedicate/mp3/sta013.htm"=20
target=3D_top>here.</A></P>
<P>There are two main ports connecting the STA013 to the AVR. The first =
is the=20
I2C interface, which Atmel calls TWI. The Mega128 contains a TWI =
interface,=20
saving me having to write bit-bashing code for it. This interface is =
used to=20
configure the STA013, basically at power-up to get it into the correct=20
configuration to do our bidding.</P>
<P>The second interface is the SPI port. Again the Mega128 contains an =
SPI port.=20
From the AVR=92s perspective this is a write-only port, and is used to =
give the=20
MP3 file to the STA013. The STA013 has a separate DATA_REQ line, which =
it uses=20
(sets high) to signal that it wants more data. When the AVR sees the =
data=20
request line active, it sends another byte over the SPI port.</P>
<P>The STA013 generates all of the clock and data signals required for =
the=20
24-bit stereo audio D/A converter, U7. The audio outputs are then =
filtered to=20
remove any digital noise and fed to the RCA audio connectors. U7 and the =
filtering components have their own audio power supply and audio ground =
plane=20
for the lowest possible noise floor.</P>
<P>Unfortunately the STA013 is a 3.3V device and is not 5V tolerant. =
This means=20
any signals driven by the AVR to the STA013 must be current-limited. =
Resistors=20
R16, R34, R35 and capacitors C27 & C28 perform this "protection" =
circuitry=20
whilst allowing the fast edge transistions through. During the design of =
the=20
player I spent some time considering "what if I ran the AVR off 3.3V?". =
With the=20
hope that doing so would remove the need for these components. =
Unfortunately=20
then the AVR, while happy to run off 3.3V, would then itself be 5V =
intolerant,=20
causing a problem with the IDE interface, which is a 5V interface. So =
that idea=20
didn't work out, and we have 5 extra components on the board (3 =
resistors and 2=20
capacitors) as a result. For those who might be wondering, the Cypress =
USB 2.0=20
part, although running off 3.3V, is 5V tolerant and so doesn't have this =
problem.</P>
<P> </P>
<H3>InfraRed Remote Control Port</H3>
<P>U8 is an IR receiver part. Its output is connected to the AVR via one =
of it=92s=20
GPIO / interrupt lines. The idea being that a standard remote control =
can be=20
used to control this player. This part is not a "decoder". All it does =
is detect=20
and demodulate the IR signal, resulting in a square wave, not too =
different to=20
what you'd see from a UART, on it's output. AVR software then times the=20
transitions of this serial bitstream to determine which remote-control =
key was=20
pressed.</P>
<P> </P>
<H3>USB 2.0 Interface</H3>
<P>My original prototype had a USB 1.1 interface, but I found that to be =
too=20
slow for transferring large numbers of MP3s to the player. The current =
board has=20
a USB 2.0 interface, which is very satisfactory. </P>
<P>USB 2.0 is implemented using a Cypress IDE Mass-storage class device, =
the=20
EZ-USB AT2 device (part number <A=20
href=3D"http://www.cypress.com/cfuploads/img/products/CY7C68300A.pdf"=20
target=3D_top>CY7C68300A</A>). This chip contains the full USB protocol =
stack=20
compliant with the mass-storage class specification. What this means is =
that=20
when you plug the player into your PC, the drive on the player =
automatically=20
pops up as a drive under Windows Explorer (in Windows OS=92s; should be =
similar in=20
Mac and Linux OS=92s). No special drivers required (except for Win98). =
You can=20
then drag and drop files to the player.</P>
<P>USB 2.0 is backwards compatible with the much-slower USB 1.1. If you =
plan to=20
shift a reasonable number of files using an older PC however, I=92d =
recommend=20
putting a USB 2.0 PCI card in your PC first. They=92re cheap and =
dramatically=20
faster than USB 1.1</P>
<P>A =93USB detect=94 signal is monitored by the AVR so that it knows =
when the user=20
plugs in a USB cable. This is the USB_5V signal. It works simply by =
detecting=20
the 5V voltage present on the USB cable coming from the host PC. When it =
sees=20
this the AVR jumps off the IDE bus (tristates its IDE signals). It then =
asserts=20
(pulls high) the USB_ENABLE signal, informing the Cypress part that =
it=92s=20
permitted to access the IDE interface. This scheme ensures there is no=20
contention for the IDE bus between the AVR and the Cypress USB 2.0 part. =
</P>
<P>A very important consideration with USB 2.0 is PCB layout. =
Particularly the=20
routing of the USB signal pair itself. The USB specification recommends =
at least=20
a 4-layer PCB to ensure good impedance-matched traces. For cost reasons =
this=20
player uses a 2-layer PCB. The USB trace pair is kept short, routed =
together and=20
routed over a ground plane to control the impedance as closely as =
possible.=20
Ground traces are also run beside the USB traces, and no vias are used. =
All of=20
these efforts should result in a reliable USB link. Testing to date =
certainly=20
appears to validate this; the link has shown no problems.</P>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -