how do I program loose FV-1 chips?

Started by Boner, May 08, 2023, 07:36:39 PM

Previous topic - Next topic

Boner

This is a dumb question, but how do I "mass produce" a small batch of pedals using the FV-1?

Been playing around with spin SPN1001-DEB programming board and I have some programs that sound really nice, but now I have no idea how to actually program the a chip.

is it possible to use the pickit 2? Even using that I have no idea how to interface it since its not through hole but SOIC-28 300

Digital Larry

You have to use an external 24LC32A EEPROM.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Ice-9

You can't program the FV-1 chip at all. The FV-1 has 8 internal programs which are coded inside the FV-1 chip. To use your own programs you use an external 24LC32 EEPROM memory chip, the programs are stored on the external EEPROM not the FV-1.
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.

Sweetalk

Besides the fact that the question has been answered (the fv1 is not programmable directly, but via an external EEPROM) I'm going to expand the answer a little bit.

When you have an SMD uC or EEPROM and you need to program it, the best way is to make a header in the PCB with the connections necessary for it. This is called ISP (In System Programming). In this particular case if you have an 24LC32A EEPROM, the programming is done via I2C, so you need the SDA and SDL lines in the connector and, obviously, power and ground.

Boner

Jesus Im dumb, no wonder I couldnt find any info on programming the FV-1

Thank you all!!

Cybercow

If you have the SPN1001-DEV programming board, you can use the SpinASM interface app to push preaches directly to the EEPROM on the SPN1001-DEV programming board. (The FV-1 itself is NOT programmable. Only the EEPROMs it access can be programmed.)

If you're using the SpinCAD Designer app to create your FV-1 patches, the SpinCAD Designer can save the patches directly to SpinASM. And then the SpinASM interface app can be loaded with up to 8 patches for pushing directly to the EEPROM on the SPN1001-DEV programming board. Voila! The EEPROM is programmed and ready to placed into a pedal that uses an FV-1 chip.
Cybercow (moo)
Don't let your talent take you where your character cannot keep you.

tuckster

I wrote a tutorial for programming the EEPROM on a german forum.
Would it useful to translate it to english or unnecessary?
For example I explained how to use an Arduino, AsProgrammer with an USBasp or CH341 Adapter and the HexeFX programmer with SpinASM (which is already explained in this forum).
  • SUPPORTER

bean

Here's a simple project you can use to program the EEPROM with a Pickit2:

EEPROM program PCB


deadastronaut

build the fv24 project. and you can programme 2 eeproms. with a pickit.

and uses the fv1 onboard sounds too.  :)

https://deadastronaut.wixsite.com/effects/fv-24deadastronautfx
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

tuckster

#9
I was searching for a convenient way to programm the EEPROM of a PedalPCB Arachnid as it does not have the built in CH341A like the PedalPCB FV-1 Development PCB.

Disclaimer: If there is something totally off and just plain wrong feel free to correct me!
These are the methods I tested, there are multiple others out there.

1. Software: Create your own bank of FV-1 programs

I don't get into detail about writing your own programs with SpinASM or create them with SpinCAD because I'm not too familiar with both of them.
SpinCad (https://holy-city-audio.gitbook.io/spincad-designer) is really intuitive but I guess others can do better tutorials on that topic.
You can download some programs here:
https://mstratman.github.io/fv1-programs/
https://github.com/mstratman/fv1-programs/tree/master/static/files

To create a bank with up to 8 programs you will need SpinASM (http://www.spinsemi.com/products.html at the bottom "Software")

In case you have the original "SPN1001-DEVB Spin FV-1 DSP Development Board" (nice name) or the "HexeFX FV-1 Programmer" you don't need additional software to burn the banks to the EEPROM.

In regard of HexeFX Programmer it is really worth it to build one. Piotr/free electron did a great job!
https://www.hexefx.com/diy/utility/fv1prog
https://www.diystompboxes.com/smfforum/index.php?topic=112333.0

Preparations in SinASM

As you can't save everything in "C:\Program Files" you have to adjust some path information for the programs in clear text (source) and the converted hex files (hex out).
A project is a collection of 8 programs. SpinCAD calls them a bank. "C header out" is not used in this tutorial.
For example like this


As I did not figure out on how to create a new project I used the demo file C:\Program Files (x86)\SpinAsm IDE\projects\Example Project.spj

Open it and double click on each of the text fields to select the programms you want to add.


If you have the FV-1 Programmer you can just select "Write EEPROM" and click "Build". If not select "Intel Hex" and click "Build".
In the end you should see this status:


Save the project file if needed.

Now you have to write/burn/flash the files to the EEPROM in case you don't own the awesome HexeFX FV-1 Programmer or the Spin Semi Dev Board.


2. Software: how to write the EEPROM

I couldn't find any other tool that supports as many programming adapters then AsProgrammer. Maybe there are others, feel free to post them.
PedalPCB provides a slightly outdated version of AsProgrammer to write to the EEPROM of their pedals with a modified configuration file to only show the one type of EEPROM they use.

https://wiki.pedalpcb.com/wiki/Using_the_FV1Dev_on_Microsoft_Windows
https://wiki.pedalpcb.com/wiki/Using_the_FV1Dev_on_Apple_macOS
https://wiki.pedalpcb.com/wiki/Using_the_FV1Dev_on_Ubuntu

The version of AsProgrammer they use can also be found in this forum threat http://forum.easyelectronics.ru/viewtopic.php?f=17&t=10947
or on the github project page https://github.com/nofeletru/UsbAsp-flash

If you start the most recent version of AsProgrammer 2.0.3a you have to select _24LC32 as the chip and i²c as protocol.



The difference to the download from PedalPCB is the modified chiplist.xml which only holds one EEPROM:

<?xml version="1.0" encoding="utf-8"?>
<!---
  size - размер данных микросхемы памяти в байтах(DEC)
  page - размер страницы микросхемы памяти в байтах(DEC). Для SST AAI Word programm - SSTW. Для SST AAI Byte programm - SSTB.
  id - индефикатор микросхемы памяти(HEX). Поддерживаются опкоды 9F, 90, AB, 15
  spicmd - команды для серий микросхем памяти 25, 45, 95(EEPROM)
  script - имя файла скрипта из папки scripts 
-->
<chiplist>
  <PedalPCB>
    <_FV1>
      <_24LC32A page="32" size="4096" addrtype="5"/>
    </_FV1>
  </PedalPCB>
</chiplist>




AsProgrammer reads binary input files. SpinASM exports only hex files or their own format.
PedalPCB provides a small tool in their AsProgrammer download to convert the Spin ASM hex to binary files called srec_cat.
The original download source https://srecord.sourceforge.net/

Example conversion


Open the binary file and you are ready to go to the topic on hardware.


3. Breadboard or in-system programming?

The more convenient way to program a EEPROM is the in-system or in-circuit programming. That means that the EEPROM stays in the target device and the adapter is connected directly to the target pcb in our case the pedal, in my case the PedalPCB Arachnid (or Modul8).

3.1. Breadboard
If you want to use a breadboard hook the EEPROM up like this with any of the following hardware adapters.
This is an exampe with an Arduino as programmer:


3.2. In-system
If you want to hook up the programmer directly to your pedal then try to find a suitable connector like a TRS jack or a USB jack where you can solder the wires to otherwise you have wires hanging out of the pedal.
Find the correct Pins and solder some wires to them. Example of SCL/SDA



I don't have a suitable connector attached to the enclosure so I don't have no shiny picture yet...

There is another method where the programmer has a socket attached to it. I don't own one but it seems to be a nicer method than the breadboard.
Now that we know where the EEPROM stays the programing adapter needs to be set up.


4. Adapters

I tried multiple adapters to use with AsProgammer.

4.1. CH341a

PedalPCB uses the CH341a for their FV-1 Development PCB to communicate via USB.

There are small adapters on ebay or amazon that can be used for exactly that purpose.
You have to be careful about the power the adapters provide. If the EEPROM stays on the target pcb with the FV-1 then the adapter has to provide 3,3V for a logical high on the SCL/SDA pins.
According to the FV-1 the digital pins have a maximum rating of 4V DC. Some CH341a adapters provide 5V as logical high which might destroy the FV-1 IC.
Even if I did not manage to kill it with 5V don't do it...

I bought a "DollaTek CH341A USB to UART/IIC/SPI/TTL/ISP adapter EPP/MEM Parallel" (original manufacturer is LC Tech)


There are three jumpers on the pcb. Top left is for the protocol to talk to the EEPROM which should be set to i²c and the two jumpers on the bottom left should set to 3,3V.
VCC for the EEPROM is beside the 3,3V jumpers (no connected on the picture).
For the programming of the EEPROM we need SCL, SDA and GND.
If you prefer to leave the EEPROM in the pedal you don't need the VCC pin for the 3,3V of the adapter as it is powered by the pedal if it stays powered on during the programming phase.

To use the CH341a adapter with AsProgrammer you have to select it from the list



Open the binary file of your project/bank and click on "Program IC". You could also try to read or erase the EEPROM first to see if the connection is ok.




4.2. USBasp

USBasp is a very common adapter for Atmel AVR microcontrollers and it can be used with AsProgrammer with a special firmware that comes with AsProgrammer.

The hex file of the firmware comes with the zip file of the AsProgrammer Release https://github.com/nofeletru/UsbAsp-flash/releases
For me this was the cheapest option as the USBasp costs me 3,89€. Of course you need another AVR ISP (which the USBasp is...) to get the firmware on the USBasp which I had in my drawer.

This is an update guide when you have a spare Arduino to flash the USBasp https://www.electronics-lab.com/project/usbasp-firmware-update-guide
Other guides are out there.

To use the USBasp with AsProgrammer you have to connect the SCL Pin of the EEPROM with the MOSI pin of the adapter and SDA with MISO.


Select USBasp from the hardware list:


This is my ugly wiring :-)



4.3. Arduino

AsProgrammer also provides a firmware for an Adruino to act as a programming adapter.
The file is located here https://github.com/nofeletru/UsbAsp-flash/tree/master/firmware/asprog/asprog.ino or in the zip file of the release.
Open it in the Arduino Editor and upload it.
Choose the SCL/SDA pins according to your Arduino model. Example above -> Breadboard.
Select the Arduino from the Hardware list:


4.4. HexeFX FV-1 DSP Programmer

Everything you need to know can be found as mentioned above here https://www.hexefx.com/diy/utility/fv1prog and here https://www.diystompboxes.com/smfforum/index.php?topic=112333.0

Some remarks from my journey to get this running:
To solder the daughter board you have to bend the jumpers on the FX2LP board else the daughter board will not fit.

If you want to use Cyconsole to prepare the EEPROM on the FX2LP board you can get the drivers here https://community.infineon.com/t5/Knowledge-Base-Articles/Drivers-for-EZ-USB-FX1-FX2LP-and-FX3-KBA94413/ta-p/248634
There are other places without a login but I don't have the links right now.

Cyconsole can be found here
https://shop.trenz-electronic.de/trenzdownloads/Trenz_Electronic/Modules_and_Module_Carriers/USB_OEM_Modules/TE-USB-Suite/recovery/tools/CyConsole.zip
or in the huge software suite (click on develeopment tools) https://www.infineon.com/cms/en/product/universal-serial-bus/usb-2.0-peripheral-controllers/ez-usb-fx2lp-fx2g2-usb-2.0-peripheral-controller/#!designsupport

Unfortunately there are multiple versions of the FX2LP clone boards. Piotr os HexeFX did take the different pin alignments into account and already modified his daughter board.
Some FX2LP have a different behavior when using the jumper for the EEPROM addressing.
I own two different boards. One provides 3,3V via the jumper to the address pin A0 (pin 1) of the onboard EEPROM.
On the other board the jumper seems to connect the A0 to GND.
Before you go on use a DMM to check which jumper position provides 3,3V to A0.
If A0 is connected with 3,3V the EEPROM is then avaibale on i²c address 0xA2. If connected to groud then it's address 0xA0.

Power on the FX2LP ans start Cyconsole. If the device got recognized then it will show up in the device list of windows and Cyconsole.
Open the "EZ-USB Interface" from "Options".



In the beginning I was not able to write VID/PID/DID to the EEPROM. For some reasons there was always an error message about the attached device not working properly.
Maybe my workaround did a reset or put the board in a special mode.
Thi sis the workaround:
Click on "Lg EEPROM" to select a firmware which should then be written to the EEPROM.
Insert some random stuff as we don't have an actual firmware and click "open".
There will be a lot of output in the status window and in the end a message showing that the file was not found.
Iside the fields besides of "Vend Req" you should enter the values from the screenshot.
First 0xA2 which has nothing to do with the address of the EEPROM but is a command which means "Downloads data to a small EEPROM", 0xA3 would be "Downloads data to internal or external RAM" etc.
The other values declare that C0 79 10 01 10 00 00 will get written to the first internal address of the EEPROM.
If "length" is 0 instead of 8 select another value in "Hex Bytes" and switch back to C0 79..... then "length" should be 8.

Click on "Vend Req" and cross your fingers that the last few lines from the screenshot appear.

Reset the board. If it worked the should be a "Spin Semi Dev Board" showing up in the windows device manager instead of the "Cypress FX2LP".

If you want to flash the EEPROM without the Cyconsole you could use PICKit as mentioned on the HexeFX page or you could use AsProgammer for example with a CH341a or USBasp adapter like this:
Connect the adapter pins SDA, SCL und GND with the corresponding pins of the FX2LP. Connect them to the Pins directly on the FX2LP board not to the pins of the daughterboard as you want to avoid the 4066 IC.
Select the "_24C128" EEPROM from the list.
Chose the "Device Address" according to the jumper settings of the FX2LP. 1010001 for 0xA2 oder 1010000 for 0xA0. The last bit is the direction bit for the r/w operation and not visible on AsProgammer that's why there are only 7 bit instead of 8 to represent 0xA2 or 0xA0.
Click on "Erase IC". If the connection is ok and the EEPROM was erased enter C0 79 10 01 10 00 00 to the top left and click on "Program IC".

If you want to connect the header pins of the daughterbord board with your pedal then chose the solder pads on the bottom side of the pcb.




E.g. SDA would be on pin 5 of the EEPROM and SCL an Pin 6. Reset would be bwtween R5 and pin 13 of the FV-1.
GND and 3,3V can be taped from any suitable spot.

After the start of SpinASM the LED on the daughter board should light up and the status in SpinASM should read:



5. Arduino without AsProgrammer

The following methof is rather tedious is an Arduino is used without AsProgrammer.
Please read https://github.com/remip/fv-1-eeprom-tools

The idea is to convert the bank of programs into C arrays and put them into the Arduino code. Then write the firmware to the Arduino.
After that you can write the EEPROM by pressing the push button.
This can be interessting if you have to write a lot of EEPROMS one after another but it is not fast when you want to modify a program multiple times and always have to modify the Arduino firmware and upload it.



6. A comparison of the workflow of the adapters

USBasp - write AsProgrammer FW to USBasp once (with Arduino or AVRISP etc), compose a bank in SpinASM, convert, load file into AsProgrammer, write EEPROM
CH341a - compose a bank in SpinASM, convert, load file into AsProgrammer, write EEPROM
Arduino - write AsProgrammer FW to Arduino once, put SpinASM Program into bank, convert, load file into AsProgrammer, write EEPROM
HexeFX FV-1 Programmer - compose a bank in SpinASM, write EEPROM
Arduino standalone - put SpinASM Program into bank, convert, copy to effects.h, write to Arduino, write to EEPROM with push button - the last step could be automated

Of course you could save a bank with SpinCAD and convert it etc but I wanted to point out that with the HexeFX FV-1 Programmer your workflow is the fastest.
If time and money is no issue then the gold medal goes to the HexeFX FV-1 Programmer or the original Spin Development Board.
The silver medal goes to the CH341a because it is 1 or 2 seconds faster during the upload then an USBasp or an Arduino despite the slightly higher cost (depending on where you buy it) and you don't have to use a specific firmware.


  • SUPPORTER

PRR

Quote from: tuckster on June 13, 2023, 04:25:09 PM

  size - размер данных микросхемы памяти в байтах(DEC)
  page - размер страницы микросхемы памяти в байтах(DEC). Для SST AAI Word programm - SSTW. Для SST AAI Byte programm - SSTB.
  id - индефикатор микросхемы памяти(HEX). Поддерживаются опкоды 9F, 90, AB, 15
  spicmd - команды для серий микросхем памяти 25, 45, 95(EEPROM)
  script - имя файла скрипта из папки scripts 
-->


  size - data size of the memory chip in bytes(DEC)
  page - page size of the memory chip in bytes (DEC). For SST AAI Word program - SSTW. For SST AAI Byte program - SSTB.
  id - memory chip identifier (HEX). Supported opcodes 9F, 90, AB, 15
  spicmd - commands for memory chip series 25, 45, 95 (EEPROM)
  script - the name of the script file from the scripts folder

  • SUPPORTER