Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer - Page 1
Forum section: electronics / general

author: soFPG
author_rank: Frequent Contributor
timestamp: September 21, 2017, 09:06:29 am
content: Hello forum,I am searching for a cheap programmer for the Lattice iCE40LP-Series which can program the internal SRAM via SPI - because I don't want to spend hundreds of dollars for the Diamond Programmer for a 2$ FPGAAre there some cheap china clones out there which work in combination with the iCEcube2 Software?Best regards

author: Marco
author_rank: Super Contributor
timestamp: September 21, 2017, 10:52:13 am
content: Wouldn't the same methods as with the upduino work? (Ice40 ultraplus) He shows how to do it with a raspberri pi and a ft232h.

author: soFPG
author_rank: Frequent Contributor
timestamp: September 21, 2017, 10:56:05 am
content: Thanks for your reply Marco,doing something with a raspberry pi and a FT232h sounds rather complicated - can you link me to the post with more information?I made a quick search on ebay for "lattice spi programmer" and I found this:http://www.ebay.com/itm/USB-Download-Cable-Jtag-SPI-Programmer-for-LATTICE-FPGA-CPLD-1000-2000-4000-/301286854526?epid=1231746445&hash=item4626188f7e:g:qQQAAMXQlgtStybVAnyone here who knows if these devices work? It would be way more convenient to have a single device which does the job than to fiddle around with raspberry.

author: Marco
author_rank: Super Contributor
timestamp: September 21, 2017, 03:24:40 pm
content: Post with some info on the upduino isjust a little loweron the forum, instructions how to use a FT232H are on theupduino page.I think the Lattice programmer uses a FT2232H with an EEPROM for configuration, it's been discussed multiple times on the forum.

author: soFPG
author_rank: Frequent Contributor
timestamp: September 21, 2017, 07:11:54 pm
content: I still dream about a single-device solution - I don't really want to mess around with a pi and FTDI chipsWould be really helpfull if someone has experiences with the ebay-programmer I posted earlier.

author: Buriedcode
author_rank: Super Contributor
timestamp: September 21, 2017, 09:34:46 pm
content: I'm not sure why one would need a raspberry pi... an FT2232 is supported by lattice diamond (well, ispVM) out of the box. It does require an external EEPROM but IIRC that is configured using FTDI's app (which enables the JTAG hardware).Since I started with programmable logic about 15 years ago, download cables have been a source of frustration. They were either very expensive, or required a parallel port. About 5-6 years ago both Lattice and Xilinx added support for generic FT2232 dongles. Altera still had the USB blaster, but you can clone that with a 64 MC CPLD and a FT245 - even then its about $10 from fleabay.Before the FT2232 I ended up writing an SVF player and bitbanged a FT232 for something that supported all three vendors. It was slow, and annoying but it worked.

author: soFPG
author_rank: Frequent Contributor
timestamp: September 22, 2017, 07:14:04 am
content: Sorry to ask you that but where can I find such a FT2232 dongle?QuoteBut maybe this device contains a FT2232 with EEPROM? I don't know. I don't want to mess around with the programming hardware because I would rather invest my time in building the board, I just want something that works without a lot of workarounds.If I read correctly, the FT2232 is a USB/UART converter (http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232D.pdf) - I have a USB/UART converter with a CH340 chip here, would this one also work?QuoteThere is a special IDE for the iCE40-Series from Lattice: iCEcube 2

author: soFPG
author_rank: Frequent Contributor
timestamp: September 22, 2017, 08:01:24 am
content: Thanks a lot for your answer,Quote from: blueskull on September 22, 2017, 07:30:27 amI am feeling so dumb asking this: but how can I do that?And how do I know which pins of the board with the FT2232H on it I have to use to program the FPGA?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 22, 2017, 08:17:48 am
content: Quote from: soFPG on September 22, 2017, 08:01:24 amFTDI's FT-PROG utilityhttp://www.ftdichip.com/Support/Utilities.htm#FT_PROG

author: ale500
author_rank: Frequent Contributor
timestamp: September 22, 2017, 11:05:02 am
content: That module costs a bit less via mouser.de.http://www.mouser.de/ProductDetail/FTDI/FT2232H-MINI-MODULE/?qs=sGAEpiMZZMvOu2nvEqRMlAhGRrWaSCdmhttp://www.mouser.de/ProductDetail/FTDI/FT2232H-56Q-MINI-MDL/?qs=sGAEpiMZZMsNqjna29dfSqaZ5MDQ5%252bjEyn%252bi%2f9ep87Y%3dWell, there are two of them.If you buy via aliexpress:https://de.aliexpress.com/item/FT2232HL-new-development-board-FT2232H-MINI-Development-Board/32738553869.html?ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_10344_10342_10343_10340_10341_10193_10194_10304_10307_10137_10060_10302_10155_10154_10056_10055_10054_10059_10532_100031_10099_10338_10339_10103_10102_440_10052_10053_10107_10050_10142_10051_10320_10321_10322_10326_10084_10083_10080_10082_10081_10177_10110_10111_10112_10113_10114_143_10180_10312_10313_10314_10184_10319_10078_10079_10073_10186,searchweb201603_30,ppcSwitch_5&btsid=adda0b0d-a05f-4d9d-b1bc-73f874ba4e88&algo_expid=96d76880-2072-48a6-b2cb-b62cf4c11704-0&algo_pvid=96d76880-2072-48a6-b2cb-b62cf4c11704Like 14 €.No idea how reliable it may be but so far I haven't had issues with what I got from aliexpress, but the delivery time you get by mouser is unbeatable: Pay on Monday and on Wed. is in south-west GermanyOk, I just bought one of the aliexpress modules for 13,10 €. Delivery time doesn't bother me, I have to get the QFN48 package soldered first, something I already tried twice. I think my hot air soldering iron is garbage. Maybe the nozzle a'm using is too thin.I'll tell you in so three weeks when (if) arrives.Another option (could be) a MachXO2 breakout board, it seems to be supported as it is, at least is that much written in this document: ProgrammingCableUsersGuide.pdf (UG48 Ver 25.0).I wanted to try that but I couldn't solder this package, even at 305 °C if I believe what the display says (AOYUE 852).

author: soFPG
author_rank: Frequent Contributor
timestamp: September 22, 2017, 11:50:06 am
content: Thanks a lot for your answer ale500,QuoteSounds very similiar to what I have planned - I also want to use QFN48 FPGA, creating the schematic, routing the PCB and getting the actual PCBs back from the manufacturer will take some time so I don't really care about delivery times from aliexpress.Do you know which pins of the FT2232-Module I have to use to get the FPGA programmed, is there a pinout description for it?

author: ale500
author_rank: Frequent Contributor
timestamp: September 22, 2017, 02:50:24 pm
content: I'll try this:http://www.latticesemi.com/view_document?document_id=51987iCE40 UltraPlus Breakout Board User Guide, Schematic on page 25 shows that the ADBUS is being used. I'll try that, after I configured my device with the given file and ftdi's utility also mentioned here.I bought QFN48-breakout boards from aliexpress too, they are already here.I'm looking for some low power (lower than the MachXO2) FPGAs, let's see if it works

author: Buriedcode
author_rank: Super Contributor
timestamp: September 23, 2017, 04:21:20 pm
content: Quote from: soFPG on September 22, 2017, 07:14:04 amYou don't need to "manually" program the EEPROM, the memory is just there to store VID/PID and configuration parameters for the chip itself, to set its modes... ie: UART, FIFO, SPI, I2C, JTAG emulators etc..FTDI's FTDIprog utility provides a nice GUI to set it up.Quote from: soFPG on September 22, 2017, 07:14:04 amThe FT2232 is dual UART/FIFO USB bridge, where each channel can be UART, FIFO, and one of them has hardware support for SPI and JTAG. With standard USB-UART bridges, the only way to do JTAG would be to bit bang (possible with the FT232) but it is much slower and of course you have to write the code for the API. I'm unsure if the CH340 has bit banging capability.QuoteI've been on about JTAG but the FT2232C also does SPI, and is a common choice on a number of FPGA boards (for either JTAG, SPI for flash, or both). I have also seen it on a few 'iCE' dev boards so I can only assume it is supported by iCEcube 2. Example:http://www.latticesemi.com/icestickAs to the availability of the FT2232C, I haven't really kept up on FTDI's range, it could be no longer supported for all I know - I just remember knocking up a cheap dev board for it and have been using it to config Lattice and Xilinx devices ever since.

author: soFPG
author_rank: Frequent Contributor
timestamp: September 24, 2017, 07:40:50 am
content: Thanks a lot for your help guys,I will buy one of those FT2232H boards from aliexpress with EPROM, I hope they will work. But I still don't know which pins of the chip I have to connect to the SPI-Programming pins of my iCE40-FPGA?https://www.aliexpress.com/item-img/FT2232HL-new-development-board-FT2232H-MINI-Development-Board/32738553869.html?spm=a2g0x.10010108.1000017.2.599a1d78OBnEc#

author: ale500
author_rank: Frequent Contributor
timestamp: October 10, 2017, 11:36:08 am
content: As I mentioned before, I bought one of these FT2232H boards from AliExpress. I just arrived !. In its current form, it is detected as a double UART.The FTProg utility recognizes the chip and applying the template I get:Product Desc: "Lattice HW-USBN-2B Ch".Lattice diamond programmer recognizes it as a HW-USBN-2B.

author: soFPG
author_rank: Frequent Contributor
timestamp: April 28, 2018, 01:46:42 pm
content: I am finally at a point where I would like to program my own little FPGA board with a FT232H. Unfortunately windows claims the FT232H as a COM-Device as soon as I plug it in. FT-Prog tells me, that it has detected an FTDI device but is unable to detect its type.How can I fix that?Edit: Somehow it worked on another PC (notebook with windows 10 as well). I just changed the type from FT2232H to FT232H in the xml-Template file. Is that correct?

author: ale500
author_rank: Frequent Contributor
timestamp: April 29, 2018, 07:18:04 am
content: I assume that you have some drivers that are being loaded and confuse ftprog.Do not change the type of chip just use the template to reprogram the ft2232h, you have a FT2232H don't you ?Can you post a picture of the window of ftprog showing what was detected for your FT2232H board ? and a picture of it too..

author: soFPG
author_rank: Frequent Contributor
timestamp: April 29, 2018, 07:32:11 am
content: Quotewith a FT232H

author: Buriedcode
author_rank: Super Contributor
timestamp: April 29, 2018, 03:30:52 pm
content: I don't have any experience with the ft232h - although I see it has the MPSSE engine for JTAG - but with the FT2232C I vaguely remember having to use FTprog to configure the JTAG or SPI port and to tell it to use the D2xx driver rather than the VCP used as default. I am assuming its the same deal for configuring the connected EEPROM on the newer FT232H.

author: iMo
author_rank: Super Contributor
timestamp: April 29, 2018, 05:41:59 pm
content: The OP has got the FT232H board which works with Diamond Programmer (ice40) and Reveal Analyzer (JTAG).The FT232H is compatible with FTxxxx (only one channel, however). FTDI developed the FT232H to offer a cheaper and smaller package version of the expensive FTxxxx.No need to mess with FTprog (you must have an eeprom attached to the FT to reprogram some settings, btw).The OP is elaborating it with Mach chips (JTAG) at this time.