6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 1:06 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Sep 04, 2004 4:40 am 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
I have been reading some stuff about non-PC MP3 players, generally those based on the STA013 MP3 decoder chip that you feed data over an I2C bus. With the higher speeds that the 6502 is now available at, I was wondering if anyone could comment on the practicality of using it as the core of a system to play MP3s with. The way I see it, the raw bus speed of a brand-new 65C02 @ 14 MHz is 14 MB/sec, and a rough average instruction time of ~4 clock cycles per instruction gives ~3.5 MIPS. (I love messing around with theoretical numbers.) MP3 data input methods ignored, what hardware would it take to push data to an I2C bus from a 6502, and about what bitrate would such a configuration be able to maintain, ignoring the time to bank-switch a chunk of memory, etc.?

Isn't the serial port on, say, the 6526 capable of being used as the underlying hardware for an I2C interface? It pumps out data and clock signals, and a parallel I/O line could be used to read the DATA_REQ pin from the STA013.

Just thought this might spark a little interest, the question has been floating in my head for a few days. I'm not a hardware genius so a little bit of the implementation of this thing is currently somewhat beyond my scope of knowledge.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 04, 2004 5:56 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
If you found an MP3 decoder chip that uses an I²C interface, I really doubt that the resulting streaming audio samples go over I²C. I²C is normally good for only 400kbps because of the passive pull-up, which translates to only about 10,000 16-bit samples per second in stereo, meaning the high end of the frequency response would be under 5kHz.

The 6526 has been out of production for many years and never got anywhere near 14MHz (or 20MHz, which most of WDC's 65c02's are capable of), but the 65c22 is in production and can keep up. I have not researched any I²C interface ICs that could be put on the 65c02's bus, but the 6522 (or any other 65-family I/O IC) can only do it by bit-banging, and a fast 65c02 could indeed keep it going at or near full speed. The 6522's serial port is not I²C-compatible. It's almost SPI-compatible, but no cigar.

I don't have any information on the MP3 algorithm except that the data compression is something on the order of 13:1. I suppose that would mean that you could indeed feed it the unprocessed data over I²C fast enough. I've done audio sampling (record and playback) on the 65c02 at around 50,000 8-bit samples per second, one channel, interrupt-driven, with a 5MHz bus clock, and obviously you could do a lot better with 14MHz or more, a 65816, and DMA or even just shortening the interrupt process by using the WAIt instruction (which also cuts the jitter). The DSP required for the MP3 algorithm though would have to be left to the special IC.


Top
 Profile  
Reply with quote  
 Post subject: STA013 Detail
PostPosted: Sat Sep 04, 2004 6:09 am 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
http://www.pjrc.com/tech/mp3/sta013.html

This site has more info on interfacing the STA013 for an MP3 player. I am talking about transferring raw MP3-compressed data over the serial link into the chip, with I2C-based commands on a separate I2C bus. See the schematic on the page for visual info.

I made an error, the MP3 data does NOT go over I2C. Sorry.

This site also talks about using an 8051 to control the STA013 and last I checked that was an 8-bit microcontroller on the lower end of the speed spectrum, like the 65xx series are.

Further comment?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 07, 2004 6:14 am 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
From the looks of things, the i2c commands do the configure, and it needs the mp3 data coming through a serial port setup. I can see the 65c02as teh master controllers, which I can fidn useful in sound porjects, but the fun matter is the storage circuitry since it is pretty much controlled from the mp3 chip when to feed the data in.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: