A simple way to program EEPROM chips

Started by sajy_ho, October 13, 2014, 03:06:09 AM

Previous topic - Next topic

sajy_ho

Hey guys, I'm totally a noob in digital effects world  :-\ so please help me into this; I'm trying to build a FV-1 based pedal(maybe Mick's Shimme rverb if I can find the parts, if not the FRAVERB from tonepad.com); and I want to add an EEPROM to hold eight more external programs for me.
Is there a simple way to do that? I mean like a COM port on the pedal that can be connected to PC, and the EEPROM(24LC32) can be programed via it?
I found this today:http://www.lcdtvrepair.us/ponyprog.php
Can it be this simple? If yes; do I need to disconnect the 24lc32 from FV-1 while programming, or it can be done with FV-1 in the place?
Thanks
Sajad
Life is too short for being regretful about it.

Ice-9

Yeah the ponyprog should work just fine, although i'm not sure about the voltage to the chip as the FV-1 is 3.3v and the Eeprom can be used at 3.3v and 5v so you would have to check if the Eeprom is being powered by the com port or the pedal power, if it's the com port then check the voltage in case it is not 3.3v at the Eeprom. The Eeprom can be programmed in place so that should be no problem as long as voltages are good but I would research more on that first.

I use a Pickit2 usb programmer which connects to the pedal via a 3 or 4 pin header.
Advantages = The ability to program many different chips (Eeproms and PICs) USB connection.
Disadvantages = Not as cheap as making your own com port programmer.
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.

slacker

That circuit works fine using either a real serial port or a USB to serial cable. I have only tried it to program the eeprom when removed from the FV-1, if you use 3.3 volt zeners it might work when connected. It is quite slow taking between 5 and 20 minutes depending on the cable used.
I had to use some different software because I couldn't get ponyprog to work, can't remember the name off hand.

sajy_ho

Thank you guys a lot; the digital circuits always seemed to me a bizarre world, but with help of you guys I'm becoming brave to get into this world :icon_lol:
So can I program the EEPROM on the board whenever I want? I mean while programing, if I use a regulated 3.3V coming out of PC it wouldn't be danger to FV-1? or I need to use a switch to disconnect FV-1 pins from EEPROM and connecting it to the com port?
Also one other question if I may; Can I just power the programmer circuit from the internal 3.3V of pedal while programming and get rid of the PC power?
Sorry for being stupid :icon_confused:
Life is too short for being regretful about it.

slacker

Quote from: sajy_ho on October 13, 2014, 07:07:12 AM
So can I program the EEPROM on the board whenever I want?

After looking at it again I don't think you can program the EEPROM whilst it is connected to the FV-1. The FV-1 has pullup resistors built into it connected to the clock and data lines, these will stop the programmer being able to pull the pins to a low enough Voltage.
I think the circuit can be modified so that it can do it, if I have time later in the week I'll experiment with it.

Quote
Also one other question if I may; Can I just power the programmer circuit from the internal 3.3V of pedal while programming and get rid of the PC power?

Yes you can power the EEPROM using the pedal's 3.3V supply. You can then remove D5, D6, D7, R3, D4, D1 and C1 these provide power to the EEPROM using signals from the serial port.

Digital Larry

The Spin Dev board accomplishes programming of the EEPROM while it is connected to the FV-1.  I don't have the schematic in front of me but as I recall the logic on the dev board simply prevents the FV-1 from driving the SCL and SDA lines at the same time as the USB interface.  Uh, OK this probably disconnects it too but unless there is a voltage discrepancy (3.3 vs. 5) I don't think it would HURT to try it.  Open collector circuits depend on pullup resistors, so unless those are REALLY low value I think an average NPN switching transistor with emitter grounded should be able to handle it.  If you have programmed an SKRM module with a PICKIT2 you've done the same thing.  Just make sure you don't do something on the FV-1 like change the program select pins while programming the EEPROM.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

slacker

That's what I was thinking of adding to the programmer, either a CD4066 or some FETS to disconnect the FV-1's SDA and SCL lines whilst programming.
Your NPN idea would be easier though as it wouldn't need any modifications to existing designs, where the EEPROM was already wired directly to the FV-1. It would just need the programming software to be able to invert the polarity of the signals to make up for the inversion caused by the transistor, ic-prog which I've used can do this.

sajy_ho

Quote from: Digital Larry on October 13, 2014, 03:29:10 PM
The Spin Dev board accomplishes programming of the EEPROM while it is connected to the FV-1.  I don't have the schematic in front of me but as I recall the logic on the dev board simply prevents the FV-1 from driving the SCL and SDA lines at the same time as the USB interface.  Uh, OK this probably disconnects it too but unless there is a voltage discrepancy (3.3 vs. 5) I don't think it would HURT to try it.  Open collector circuits depend on pullup resistors, so unless those are REALLY low value I think an average NPN switching transistor with emitter grounded should be able to handle it.  If you have programmed an SKRM module with a PICKIT2 you've done the same thing.  Just make sure you don't do something on the FV-1 like change the program select pins while programming the EEPROM.
Thanks man; that's a good idea.
Quote from: slacker on October 13, 2014, 03:52:21 PM
That's what I was thinking of adding to the programmer, either a CD4066 or some FETS to disconnect the FV-1's SDA and SCL lines whilst programming.
Your NPN idea would be easier though as it wouldn't need any modifications to existing designs, where the EEPROM was already wired directly to the FV-1. It would just need the programming software to be able to invert the polarity of the signals to make up for the inversion caused by the transistor, ic-prog which I've used can do this.
Thanks a lot, also helpful software ;)
Life is too short for being regretful about it.

octfrank

The FV-1 only interacts with the EEPROM when a program is changed and it needs to load a new one, the pull up resistors are built into the SDA and SCL pads so you can use an open collector device connected to the FV-1/EEPROM lines to program the EEPROM without disconnecting the FV-1 first. As long as it is all 3.3V and the programmer and FV-1 do not try to talk to the EEPROM at the same time all is good.
Frank Thomson
Experimental Noize

sajy_ho

Quote from: octfrank on October 13, 2014, 04:29:56 PM
The FV-1 only interacts with the EEPROM when a program is changed and it needs to load a new one, the pull up resistors are built into the SDA and SCL pads so you can use an open collector device connected to the FV-1/EEPROM lines to program the EEPROM without disconnecting the FV-1 first. As long as it is all 3.3V and the programmer and FV-1 do not try to talk to the EEPROM at the same time all is good.
Thank you man, I think building the programmer on a piece of vero and designing a USB port with your mod in the pedal will be my last decision.
Also I find this lovely chip here in a very low price:www.atmel.com/images/doc0336.pdf
The datasheet says it can be used in 3.3V too. I found it in PDIP package; so one other option is to solder an IC socket and remove it whenever I want.
Life is too short for being regretful about it.

slacker

#10
I had a little play about and came up with this, as an alternative to the programmer sajy_ho posted earlier. I'm pretty sure it's not original, I seem to recall seeing similar circuits when I was looking for programmers a few years back.



It doesn't provide any power, and relies on the FV-1's built in SDA and SCK pull up resistors, so it's only suitable for programming the eeprom when it's connected to an FV-1 and the circuit is powered.
If you remove the serial cable it doesn't interfere with the normal operation of the FV-1, so you could build it into a pedal and add a D9 connector for programming. A neater way would be to build it as an external device that way it only needs 3 connections to the pedal, SDA, SCK and ground, which you can do using a 1/8" stereo jack.

It works with ic-prog that I mentioned earlier, I'll post some instructions on what settings to use.

It should work with real RS232 signals or TTL level signals, which should cover most USB to serial cables. I've only tested it with a cheapest of the cheap "Chinese" USB to serial cable for now.

sajy_ho

Wow man, that's exactly what I was looking for!
I'm designing a new PCB for FV-1 multi-effect; something like Ice9's design, but with less parts count and single side board; something that everyone can build. I will post it soon.
So what transistor and diode did you use for it?
Life is too short for being regretful about it.

slacker

2N3904 transistors and 1N4148 diodes, pretty much anything should work though.

micahvdm

Hi slacker, sorry to bring up an old topic, but what setting did you use in IC-prog?

slacker

You want to set the device to 24C32 Settings >> Device >> I2C Eeprom >> 24C32

Then in the Settings >> Hardware
Set Programmer to "JDM Programmer"
Tick "Invert Data Out" and "Invert Clock" if it doesn't work like that then try unticking them, some USB to serial converters have the opposite polarity.