SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kaiki
#17747
I can't seem to figure out how the Olimex MOD-MP3 board works in standalone mode without a micro?

I see that there's a 3 way switch for play/pause/ff/rev, but how do they connect/control to the VS1002 chip?

How does the VS1002 address the SD card? I see its a SPI connection but how does it know how to traverse the FAT16/32 formatted SD card directories and pick up individual MP3 files?
By kaiki
#17904
okay so I finally found something that explains how to make a standalone MP3 player like the olimex one.
http://www.vlsi.fi/player_vs10xx_proto/standalone.pdf

What I can't understand now is how does one program the SPI EEPROM (25LC640), I'm guessing i need a seperate gang programmer, but can't seem to find anything cheap online. Any ideas on how to do this on the cheap?

Thanks.
By P.O.
#20913
Hello kaiki,

I too am in this situation, and I am quite disconcerted about the lack of information there is about this module.

I'm quite sure you can reprogram the on-board eeprom with a SPI programmer, as I am convinced the eeprom is initially programmed that way -hence the presence of the EEPGM pads on the board. I found that the PonyProg http://www.lancos.com/ppwin95.html , which should cost next to nothing to build, should probably fill the bill nicely. You would connect the programmer to the EEPGM pads on the MOD-MP3 board.

However, according to the VS1002 datasheet, the maximum voltage that can be applied to any of its pins is 3.6V. I am not sure if the PonyProg would be safe to connect to the MOD-MP3 board as it looks to me it would apply 5V there.

I have asked that question to Olimex. Not sure if I'll get an answer. I'd like to know what they use to program the 25LC640. In the meantime I'll build the PonyProg and check how much voltage it actually puts out. Maybe it is a simple matter of changing the PonyProg's
5V limiting zeners to 3V....
By P.O.
#20989
Quoth Olimex:

we write the EEPROM with PonyProg
our AVR-PG1 (PonyProg) uses target circuit voltage
Thanks
Olimex

So yo buy or build an AVR-PG1 programmer, and you connect it to the EEPGM pads on the MOD-MP3 module. Then you load your code in the eeprom with the PonyProg software. Looks simple...

P.O.
By cvecchio
#21910
But note, if all you want to do is operate in stand-alone mode, the EEPROM comes preprogrammed for this.
The operation is essentially the same as that described for VLSI's own development board which is much better documented: http://www.vlsi.fi/player_vs10xx_proto/player.shtml

Here's the quick start guide:
1) add power (AA battery)
2) make sure the EXT/BAT jumper is set to BAT
3) make sure the DREQ_E jumper is in place for stand-alone operation (I think this needs to be removed for control over UEXT)
4) insert headphones
5) use the switch as follows:

move left briefly - next song
move right briefly - last song
press in briefly - play/pause

move left and hold - volume up
move right and hold - volume down
press in and hold - if playing this will toggle loudness, if paused it will toggle random play

- Chris
www.noisemantra.com
By P.O.
#21942
Damn!
I'm so frustrated by the lack of information on this module!

I finally found how to reprogram the on-board eeprom to get SCI-controlled operation. I just found out by reading your post I must remove the DREQ jumper. HOW WAS I SUPPOSED TO KNOW THAT??!?? The xDCS is also supposed to have a pullup. What is this line used for?

I want to control the module with a Basic Stamp 2. So far I got no results. Cannot even read registers.
I put resistors on the lines because I don't want to fry the VS1002 pins (3V) by the voltage outputted by the stamp (5V). Don't know if this is a good idea...

P.O.
By cvecchio
#21944
Yeah, I feel your pain. One or two pages from Olimex could make a world of difference. Even the schematic they provide is screwed up - the connections to the SW1, SW2, SW3 switch make no sense whatsoever.

This page says a bit more about controlling the thing from SCI:
http://www.vlsi.fi/player_vs10xx_proto/faq/faq.shtml
It also says you can boot from the EEPROM and then control over SCI.
I haven't tried it yet but I'd guess this would be the easiest way to get up and running.

In general, 3.3V logic inputs should be 5V tolerant (and 5V logic should correctly read 3.3V outputs) but your resistors can't hurt anything so may as well leave them in there.

- Chris
www.noisemantra.com
By cvecchio
#22002
CORRECTION: the vs1002 datasheet says the I/O pins should NOT be driven above 3.6V so I'd try to run your PIC at 3.3V.

Also, from reading the ASIC's datasheet:
http://www.vlsi.fi/datasheets/vs1002.pdf
and studying the MOD-MP3 schematic (but that switch diagram is still gibberish...) I've learned a few things.

The vs1002 has two SPI buses, one for control and one for data.
In stand-alone mode it boots over the bus formed by SW-MOSI, SW-MISO, SW-CS1, SW-CS2.
It also uses this bus to get data from the SD memory card.

The other SPI bus connects only to the UEXT connector and nowhere else that I can see. It seems to me that you should be able to boot via the EEPROM, leave the DREQ jumper in place (so you're reading music data from the SD card), and write to the vs1002 configuration registers using CS, MOSI, and SCK on the UEXT connector.
See section 7.5.3 in the vs1002 datasheet.

The configuration registers are described in section 8.6 and in chapter 10.

Please post anything you discover!

- Chris
www.noisemantra.com
By P.O.
#22043
Well, Chris, that's exactly the path I've taken, and that's where I am!...

I did study the datasheeet, and I'm connecting through the UEXT connector using the CS, MOSI, MISO and SCK lines. I tied the xDCS line high. I can't communicate, whether I leave the DREQ jumper in or not.

At this point, my first suspect is the level difference between the devices (3V mp3-mod and 5V Stamp). I have thought of running the stamp at 3V (it is a Stamp Stack from HVW) but I'm not sure if this will work. will have to try it.

Then there is the software. I modded a piece of generic BASIC code. I'm pretty sure it's OK, but there's always one more bug...

BTW I visited your site: pretty neat stuff!... The work I do is for artists.


tata

P.O.
By spayer
#77298
P.O., you wrote, that you succeeded in programming the MOD-MP3. I'm trying the same but have some problems with that.

At first I wanted to read from the EEPROM, so that I can ensure the configuration is done properly.

I used the PonyProg, an AVR-PG2, removed the DREQ, jumper to battery mode and reset is removed. In PonyProg I entered as device the 25XXX series and as model 2564X/95640. But then it always reads 0s, if trying some other parameters, it always reads Fs.

I'm not sure with the device and model, it seems that a 25LC640 isn't available. What configuration did you use?

Did reading work for you?

Thanks for any comments.
By Flokko
#78313
Hi there List,

all in all I'm having the same problems with the MOD-MP3 and the AVR-PG1 that you'r discussing here. I connected the programmers ICSP connector to the EEPGM port of the MOD-MP3 board, beeing able to read FF's out of the SPI EEPROM.
Unless I'm unable to figure out how to continue, I wrote an email to olimex, asking them 4 help. They are on holiday till 31.08.09 so I'll have to wait for the answer. Maybe there are some other technic freaks around here that can help us to solve the problem.
Here's what I wrote to Olimex:

Dear Madams, and Sirs,

I bought one of your MOD-MP3 boards for testing purpose. I followed several FAQ's and discussions to find out how to programm/flash the Olimex MOD-MP3 board with the AVR-PG1. Background is, that I want the player to loop the songs automatically after standalone boot. Unless I didn't find any solution, I ask you for help.

I found out, that the SPI EEPROM (25LC640) that holds the standalone code for the VS1002 can be flashed by connecting the AVR-PG1 to the EEPGM Pins on the MOD-MP3 Board. Is that correct?

I tried flashing the EEPROM in standalone mode. So the two jumpers on the baord are in the position for standalone mode. I didn't change them. They got left in the position as you sold the board.

I build an avr programmer myself and tried to connect to the eepgm. Somehow the given schemantics of the programmer and the modmp3 board are a little bit confusing.

The ICSP Connector of the AVR programmer has the pins
ICSP
1 = MOSI 2 = 5V
3 = 4 = GND
5 = RESET 6 = GND
7 = SCK 8 = GND
9 = MISO 10= GND

The EEPGM has almost the same pins, except for the reset pin:
1 = 3V3 2 = GND
3 = MISO 4 = MOSI
5 = SCK 6 = CS

So I connected the pins in the following manner:

ICSP -> EEPGM
MOSI 1 -> 4
SCK 7 -> 5
GND 4,6,8,10 -> 2
MISO 9 -> 3
????? 5 -> 6
5V 2 -> nowhere / power on the board taken from the batterie
3 -> nowhere

Here are my Question:
- Is the way, I try to flash the eeprom correct?
- Is ICSP Pin RESET connected correctly to the CS Pin of the EEPGM?
- Can the EEPROM be flashed while using the 3V3 batterie power?
- Why is ponyprog only reading FF's?
- Can I programm the board using the UEXT connector.
- In which position do the jumpers have to be, to flash the board over the eepgm port?
- Can the sample code of the standalone player application of the vlsi Solution VS-10xx Proto Board be used, to make the modification i want (looping automatically).

I'm looking forward to hearing from you, thanx 4 your help and
Cheers,

So maybe somebody else knows the answer. Otherwise I'll come back here at the beginnig of september, to post the reply of olimex.

Cheers, board
By spayer
#78518
Hallo,

I was asking me nearly the same questions, when trying to get along with the Olimex MOD-MP3 board. I was writing a few e-mails with the Olimex support to get the answers I needed.
I found out, that the SPI EEPROM (25LC640) that holds the standalone code for the VS1002 can be flashed by connecting the AVR-PG1 to the EEPGM Pins on the MOD-MP3 Board. Is that correct?
Yes, that's correct. I did it this way and it worked.
Here are my Question:
- Is the way, I try to flash the eeprom correct?
It does not seem so for me, see below.
- Is ICSP Pin RESET connected correctly to the CS Pin of the EEPGM?
I think, this is correct. See the table below, I got from the Olimex support.
- Can the EEPROM be flashed while using the 3V3 batterie power?
Yes, I did it this way. I think, it's the only way.
- Why is ponyprog only reading FF's?
I think, this is caused by a setup problem. I had the same, too, until I resolved the problems.
- Can I programm the board using the UEXT connector.
No, the Olimex support told me, that this does not work.
- In which position do the jumpers have to be, to flash the board over the eepgm port?
  • - RST is closed
    - EXT/BAT is in place for BAT power supply
    - DREQ is open
This setting worked for me and the support told me, that this is correct.
- Can the sample code of the standalone player application of the vlsi Solution VS-10xx Proto Board be used, to make the modification i want (looping automatically).
I think this should work. I did not modify and compile the code, but took a compiled version of the standalone code and programmed the board with that code.

I took the AVR-PG2 to programm the board. The support says, that both, PG1 and PG2, should work.
You have to make a cable to connect the AVR-PG[1|2] with the EEPGM pins on the board. I got the following table from the support:
Code: Select all
programer                       |
ICSP connector                  |
pin                             |   EEPGM pin
------------------------------------------------------
2                    connect to        1   
6                    connect to        2
9                    connect to        3   
1                    connect to        4
7                    connect to        5
5                    connect to        6
 
EEPGM pin 1 is square
You should use only the battery mode for programming, since the board must not be connected to higher voltage supply than 3.6V. I think the programmer has 5V power supply.
For PonyProg, I used the following settings:
  • - PonyProg device is SPI EEPROM 2564X/95640
    - PonyProg Interface Setup is AVR-ISP I/O
So, making a cable from the AVR-PG[1|2] to EEPGM pins on board according to the table, setting the jumpers as described and setting PonyProg as described worked for me.

But I'm wondering, looping does work for me without code change automatically. I just wanted to adjust the default volume. But let me know if you succeeded with the code change, I'm thinking about storing the position and go on at this position at next start-up.

Hopefully this helps you to get along with the board. It would make life easier, if Olimex would supply this little information in the data sheets.