Archive for the ‘Mp3 Player’ Category

Update

Wednesday, November 8th, 2006

Eagle Schematic (a work in progress)

PCB Layout (a work in progress)

School and work have really been consuming most of my life since September, but this past week or so I’ve found some time to pick up where I left off with the MP3 player.

My FAT16 driver is now working a bit better. I fixed a few annoying bugs and have updated my read method so that I can tell when I’m at the end of a file. I’ve been working on a newer version of the read method that is a bit more useful. Previously, in one method it would read the entire file and output the data directly to the LCD, 32 characters at a time (overwriting the previously read data every sector). This is nifty as a proof of concept but not really too useful.

Instead, I’m working on a new version of the read routine that reads a sector of the file, copies it to a user specified buffer, updates some indecies in the file structure, and then returns the total length of the data returned (which is always 512 bytes until the last chunk). So you call the read method multiple times until you’re at the end of the file. This will let me actually *use* the data instead of immediately throwing it away. I decided to use a second buffer (in addition to the physical layer buffer that stores data straight from the SD card) so that I don’t have to worry about overwriting data with future SD read requests. This isn’t so important now when I’m only doing one thing at a time, but in the final version I may want to be able to browse the SD card while playing an MP3 (for instance).

The MP3 decoder has been interfaced for a while, but I’m having a bit of difficulty configuring it. It requires a special sequence of writes to configure the decoder with details on the clock and other undocumented settings (over 2000 such writes). Right now I’m storing the file in the root directory of the SD card and will open the file, read its contents, and transfer it over to the decoder. Eventually I may just store this configuration data in ROM, but for now it’s a good opportunity to test my FAT driver. Once I’ve got the configuration file sent over, I’ll be able to send the RUN command and hopefully the decoder will start asking for data.

I’ve also been playing around with EAGLE a bit, drawing up my schematic and working on a PCB design. It’s really nowhere near ready yet, but I thought I’d mention it. I’ll post some images of the schematic and PCB layout in the next day or so.

The worlds worst eBook Reader

Friday, September 8th, 2006

I haven’t posted in a while, but I have made some progress. I’ve been working on my fat driver and it is coming along very nicely. Right now I can navigate the contents of the SD card and read any file.

As a test, I put a 4mb file on the sd card to try and read, and I can successfully read the entire contents of the file on the two line display, effectively making this the worlds worst eBook reader. =) I’ve also converted the fat16 code to use structs so that I don’t have as messy of an interface between the methods. My next step is to figure out when I’m at the end of a file and stop reading at the appropriate spot. Currently, I stop reading at the end of the last cluster in the file, but most files won’t fill up the entire last cluster.

On another front, I’ve managed to interface the STA013 to the pic. Unfortunately I couldn’t use the PIC’s serial module for both SPI and I2C as I had originally planned, so instead I am using the compiler to do software I2C. It is considerably slower, but still more than adequate for just configuring the decoder.

New Goodies!

Thursday, August 17th, 2006

Goodies!
L to R: PIC18LF4585 DIPs and SMT, 2GB SD Kingston SD card, USB SD Card Reader, SD Card Ejector Sockets

I’ve sampled (and purchased) a few more goodies for the project. Most importantly, I’ve sampled some new 18LF4585 PIC’s. The major difference with these PIC’s is that they have more RAM (roughly 3.3Kb as apposed to 368 bytes offered by the 16F877A), they run faster 40Mhz after enableing the Phase Lock Loop Multiplier, an internal 8Mhz oscillator (wow, that’s pretty cool), and few power saving features.
PIC18F4585 Datasheet

Next, I’ve sampled new Crystals (not pictured above) from Fox Electronics. Among my new crystals are two 10Mhz, two 20Mhz, and two 14.7456Mhz. The latter will be used for the STA013 MP3 decoder.

Read more for details on the new card slots, reading the new memory card, and my plans for tomorrow….
(more…)