DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: FantomXR on January 18, 2022, 02:16:25 AM

Title: FV-1 stops working when using EPROM
Post by: FantomXR on January 18, 2022, 02:16:25 AM
Hey people,

I've made a PCB for a FV-1. Its running perfect when using the internal ROM (Jumper J3 shorted).
If I remove this jumper, T0 should be pulled to GND though the FV-1 should use the EPROM. But the FV-1 stops working which I can see on my bench power supply (power consumption drops from 120mA to about 80mA) and also my oscilloscope shows, that the oscillator stops working.
I tried using a higher capacitance on the crystal, but this made no difference... since the FV-1 is running great with the internal ROM, I really don't think that this is the culprit.

The jumper on J4 shorts pin 2 and 3 => EPROM gets supplied with 3.3V (verified with oscilloscope)
J5 is not used.
J6 is for selecting the program and is open, but it makes no difference if I put a jumper there or not.

Do you have any idea?!

The only thing I can think of is that the EPROM was not flashed correctly. I used this tutorial:
https://www.diystompboxes.com/smfforum/index.php?topic=121408.msg1156740#msg1156740

And the Serial Monitor of the Arduino software says, that all bytes have been written successful.

Maybe I should try another EPROM Programmer? Any ideas what to use?

Thanks,
Chris
(https://i.postimg.cc/vg2hZCgz/Bildschirmfoto-2022-01-18-um-08-09-08.png) (https://postimg.cc/vg2hZCgz)
Title: Re: FV-1 stops working when using EPROM
Post by: octfrank on January 18, 2022, 09:30:02 AM
Assuming it is all correct I would read out the EEPROM and see what is in it to make sure it flashed correctly.
Title: Re: FV-1 stops working when using EPROM
Post by: mark2 on January 18, 2022, 02:05:30 PM
QuoteMaybe I should try another EPROM Programmer? Any ideas what to use?

I use a super cheap CH341A eeprom programmer.

I do an extra step where I'll read back the EEPROM and compare it to the input file to catch errors. When there's a problem I just unplug and plug it back in and try again.  Since I added that step I get zero bad chips. Here's the script if it helps: https://gist.github.com/mstratman/6d1f567974ba306a145588434d0c49a8

If you are in the US and it would help, I can ship you a known working EEPROM at cost (ship+chip, $6).
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 18, 2022, 02:45:14 PM
I ordered a cheap CH341 programmer at eBay and will try it.

So you use the terminal to flash the hex to the EPROM?
Title: Re: FV-1 stops working when using EPROM
Post by: mark2 on January 18, 2022, 02:50:34 PM
Quote from: FantomXR on January 18, 2022, 02:45:14 PM
So you use the terminal to flash the hex to the EPROM?

I do. It's using this commandline tool for Mac: https://github.com/command-tab/ch341eeprom

And for the record I believe I have some unnecessary steps in my workflow. e.g. I output a hex from the assembler, then manually convert it to a bin. But in my early days this is what I was able to get working, and I've just stuck with it. There may well be a more direct way without the extra steps or extra tools.

But if you find a better way or using alternate tools, the basic idea of reading and verifying the EEPROM contents should still be doable.
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 18, 2022, 03:22:15 PM
I'll check and report back as soon as I receive the programmer! Thanks for the input!
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 24, 2022, 11:39:53 AM
I've received the programmer.

Unfortunately I was not able to get it running under Mac OS. The terminal says "ch341eeprom: command not found".

So I switched to a computer running Win 10 and I was able to successfully install the programmer and burn the IC through ASProgrammer.

But the result is the same: I plug it into the socket, switch on the power supply and the clip LED lights up. The power consumption is at 80mA. If I add the jumper to use the internal programs, the LED is off and the power consumption rises up to 120mA.

So there is still a culprit it seems.

Could maybe someone upload a working hex file? Maybe there is something wrong with my files...
Title: Re: FV-1 stops working when using EPROM
Post by: Ice-9 on January 24, 2022, 12:42:20 PM
If the clip LED is constantly on when using EEPROM programs it usually points to the EEPROM being blank. If this is the case and you can select the 8 program selections from the EEPROM via a switch then all you will hear is a click or pop when changing programs if the EEPROM is blank or incorrectly programmed.
Title: Re: FV-1 stops working when using EPROM
Post by: mark2 on January 24, 2022, 12:46:49 PM
Quote from: FantomXR on January 24, 2022, 11:39:53 AM
I've received the programmer.

Unfortunately I was not able to get it running under Mac OS. The terminal says "ch341eeprom: command not found".

You'll need the developer tools installed and use homebrew. Here's the info: https://github.com/command-tab/ch341eeprom (https://github.com/command-tab/ch341eeprom)

But if you have a windows computer that's probably going to be easier.

Quote
Could maybe someone upload a working hex file? Maybe there is something wrong with my files...

Here's a working hex file and its resulting bin (that ultimately needs to go on the eeprom): https://drive.google.com/drive/folders/1NL7xmDVBauNIlLh0LdrQTaQQNh1lch9d?usp=sharing (https://drive.google.com/drive/folders/1NL7xmDVBauNIlLh0LdrQTaQQNh1lch9d?usp=sharing)
Title: Re: FV-1 stops working when using EPROM
Post by: potul on January 24, 2022, 12:49:00 PM
I don't see any way to attach a file in the forum. Send me a PM with your email and I will send you a test hex file.
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 24, 2022, 01:18:44 PM
I haven't tested your files yet. But for a test I used the files from here:
http://spinsemi.com/guitar_amp_application.html

I've converted the *.hex to *.bin using the CMD and an application that comes with ASProgrammer.

I connected the CH341a to the computer, started ASProgrammer. I can read from the chip perfectly. I open the *.bin-File and program the chip. The application says, it was successfully written.

But the behavior is the same... I really have NO idea whats wrong here.....
Title: Re: FV-1 stops working when using EPROM
Post by: Ice-9 on January 24, 2022, 02:09:15 PM
mark2's posted hex file works as i tested it with no problem as do the link you posted for the SpinSemi website. I would suggest you use a Pickit2 programmer to program your EEPROMS.
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 24, 2022, 02:30:52 PM
Since I now used two different kind of programmers (Arduino at first and the CH341A now) and both applications say, that they program successful I have the feeling that the culprit is not the programming... maybe I'm wrong...
Title: Re: FV-1 stops working when using EPROM
Post by: Digital Larry on January 24, 2022, 06:52:01 PM
I put external pullups on SCK and SDA on my board design.  Not sure if they are needed but it would be interesting to check the voltages there, they should be really close to 3.3 volts most of the time.
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 25, 2022, 03:33:51 AM
I measured with the oscilloscope and SDA and SDK are high without pullups. I will try it though...
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 25, 2022, 03:44:25 AM
Here is the layout by the way.

(https://i.postimg.cc/HJsxPxBn/Bildschirmfoto-2022-01-25-um-09-38-58.png) (https://postimg.cc/HJsxPxBn)
Title: Re: FV-1 stops working when using EPROM
Post by: free electron on January 25, 2022, 04:33:07 AM
Maybe a stupid question... You are not forgetting to put a jumper on pins 2 and 3 of J5 after putting the eeprom back? Otherwise it's not getting any power.
No decoupling caps on the 3V3 rail might also pose a problem - there might be a glitch when the DSP tries to read the eeprom making the i2c read fail.
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 25, 2022, 05:20:11 AM
Not a stupid question. But I did not forget it :-) I checked the voltages on all pins and they seem to be correct..

I will try adding a decoupling cap although the power supply should be very stable... its worth a try though!
Title: Re: FV-1 stops working when using EPROM
Post by: Ice-9 on January 25, 2022, 11:35:38 AM
It might be worth programming the EEPROM then read it back, save the hex file and post it here, if one of us can try the hex file that you read back from your EEPROM to make sure it is working that would confirm if your EEPROM is programmed correctly.

Alternatively you could use a file check program to confirm the data that you write to the EEPOM is exactly the same as you read back. There is an online compare program called diffchecker.
Title: Re: FV-1 stops working when using EPROM
Post by: Sweetalk on January 26, 2022, 04:25:03 AM
I think I found your problem. You're switching T1 (pin 12) for internal/external instead of T0 (pin 13). T1 must be grounded all the
time to work properly and T0 is the interal/external program pin. That's why works on internal but not on externals.
Try to cut the vias from pin 13, cut the trace from pin 12 and connect pin 12 to ground and 13 to the jumper/pullup resistor.




Title: Re: FV-1 stops working when using EPROM
Post by: pruttelherrie on January 26, 2022, 12:56:48 PM
Quote from: Sweetalk on January 26, 2022, 04:25:03 AM
I think I found your problem. You're switching T1 (pin 12) for internal/external instead of T0 (pin 13). T1 must be grounded all the
time to work properly and T0 is the interal/external program pin. That's why works on internal but not on externals.
Try to cut the vias from pin 13, cut the trace from pin 12 and connect pin 12 to ground and 13 to the jumper/pullup resistor.
It seems you're right, and if you look at the schematic in the first post you'll see that the component definition is already wrong! What program was used and where did the pinout come from?
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 26, 2022, 01:34:26 PM
Damn! Great spot!

I'll give that a try!!

It looks like I made a mistake when creating the symbol for the FV-1 in KiCad...

I'll try that tomorrow and report back!

Thanks AGAIN!
Title: Re: FV-1 stops working when using EPROM
Post by: FantomXR on January 27, 2022, 03:06:04 PM
Thanks thanks thanks....

I modified the PCB and et voila... it works perfectly!

Great chip! :-)
Title: Re: FV-1 stops working when using EPROM
Post by: Sweetalk on January 28, 2022, 04:10:08 AM
Great to hear that, enjoy!