A 5V CPLD in 2023? - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 15, 2023, 09:03:45 pm
content: I have a one-off (OK... a couple off project)... I need to replace a custom chip from an arcade game...So the game is 5V TTL with a bit of custom silicon in a 28 pin DIP package.I don't exactly know the functionality yet but I believe it to be simple... we can get to complexity later.I know it has two 8-bit inputs. i.e. 2x8 pins for data inI know it has one 4-bit output.I know it has 3 control lines.So in total I need 16+3=19 ins and 4 outs. All at 5V TTL.For simplicity let's assume one line clocks all 16 inputs into a latch, and then the 2nd control line clocks out the 16 bits into the outputs 4 bits at the time. The 3rd line determines the order the nibbles are clocked out (in sets of fours) either least significant nibble then up, or most significant nibble then down.I could probably do this in 74 series logic but that's going to take a few devices and make it big...Any suggestions?(I would like something that isn't too obsolete but it is a home project so possibly could use old stock)PSI only have 4 outputs... so maybe something that was 5V tolerant on inputs and I could level shift the 4 outputs? BTW... Operating frequency <2MHz

author: james_s
author_rank: Super Contributor
timestamp: March 15, 2023, 09:24:21 pm
content: Have you looked at the various projects out there already to do exactly this? Some use 5V tolerant parts, some use level shifters on the carrier board.

author: _pat_
author_rank: Contributor
timestamp: March 15, 2023, 09:34:34 pm
content: NivagSwerdna,might I suggest that you cast your eyes over the Xilinx XC9500XL series ? Whilst 3.3V parts they have 5V tolerant inputs so could directly interface on that side.On the output side you can either use dedicated level shifter devices or, given the relatively low speed and that there's only 4 of them, you could use discrete (or co-packaged) N-channel FETs (gate to 3.3V, source to CPLD, drain to pullup resistor to 5V, output is from drain).Hope this helps,Pat.

author: langwadt
author_rank: Super Contributor
timestamp: March 15, 2023, 09:39:10 pm
content: afaict XC9500XL is still available, it is 5V tolerant. If you system is really TTL threshhold is 2.4V so 3.3V is sufficient for output, else something like two 74HCT2G34 on 5V should do for 4 outputs

author: tchiwam
author_rank: Regular Contributor
timestamp: March 15, 2023, 09:51:13 pm
content: Some level shifters fit neatly under a dip600 package while the fpga can fit on top. needs a 4 layer board but it makes it a near drop in.Dip 300... need to get creative and go around the other components...

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 16, 2023, 12:14:13 am
content: Quote from: james_s on March 15, 2023, 09:24:21 pmThe ones I have seen seem to date back a few years and use un-obtainium parts.

author: AK6DN
author_rank: Regular Contributor
timestamp: March 16, 2023, 02:06:16 am
content: Look at the Atmel/Microchip ATF1502AS/ATF1504AS/ATF1508AS parts..Compatible with legacy Altera MAX7000 series parts.32/64/128 macrocell versions.PLCC packaging available.Full 5V tolerant versions.AND it is a part that is still in active production.Available at DigiKey, Mouser, etc distributors.FYI I design for the part using Altera Quartus 13.0sp1 using Verilog, targeting a MAX EPM7032S/EPM7064S/EPM7128S as necessary.Then I use the Microchip POF2JED program to translate the ALtera POF file to the Atmel JED file to program the device.

author: Scrts
author_rank: Frequent Contributor
timestamp: March 16, 2023, 03:25:15 am
content: 19 voltage dividers for inputs? and a 4ch buffer for outputs? Or 3x SN74LVC8T245, which will cover 24 lines.

author: BrianHG
author_rank: Super Contributor
timestamp: March 16, 2023, 04:47:30 am
content: Quote from: NivagSwerdna on March 15, 2023, 09:03:45 pmWhat's wrong with 3x PAL or GAL22V10?How about a EPM7064 or equivilant from Microchip. (64 DFFs/LCs internally.)Maybe a small EPROM?All available today in 5v natively.

author: BrianHG
author_rank: Super Contributor
timestamp: March 16, 2023, 04:59:26 am
content: EPM3128 are still available with 5v IO. Note you might need a 2.5v LDO for core VCCint.Also, EPM7128 might work at 27$ here:https://www.arrow.com/en/products/epm7128stc100-15n/intel11$ PLCC version, all 5v version, no VCCint regulator needed:https://www.arrow.com/en/products/epm7128slc84-10n/intelDepending on packaging and voltage, you can find the EPM7064 as cheap as 2$ in 44pin TQFP.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 16, 2023, 10:43:33 am
content: Quote from: AK6DN on March 16, 2023, 02:06:16 amThat looks interesting. I didn't realise you could do that.Quote from: BrianHG on March 16, 2023, 04:47:30 amNot a bad idea. Hadn't considered using several.FWIW... My only other project which uses a reasonable amount of logic uses ICE40UP5K-SG48ITR (<£5) so I am already well tooled up for that device. Obviously I need voltage regulation and level shifting if I go that route but maybe I could cram it in. (A ICE40LP384-SG32 is <£2... that probably has enough LUTs; not quite enough I/O)AK6DN's suggestion does look like a close fit and I have played with Quartus before.

author: BrianHG
author_rank: Super Contributor
timestamp: March 16, 2023, 11:29:09 am
content: Just so you know, the EPM7XXX I listed above are the MAX7000 devices. Buying the actual EPM7128s means not JTAG translation tool, you wire your Altera programmer directly to the CPLD and program direct in Quartus.For a 1 time thing, the 11$ device I listed is an all 5v device.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 16, 2023, 11:43:05 am
content: I'm quite keen to avoid obsolete parts. I will probably open source this so would like it to be repeatable over at least some short time span.Oh dear... just checked... ICE40UP5K-SG48ITR now marked Obsolete on Mouser UK but Active on Mouser US... not sure about that!

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 16, 2023, 04:07:45 pm
content: I'm being a bit slow here because I know nothing about most of the devices mentioned...So a ATF1504AS (which is available and appears to be production status) is like a EPM7064 so can be developed in Quartus as a EPM7064 and then programmed via JTAG after tweaking with POF2JED?I have a 'Lattice' "USB ispDOWNLOAD Cable" HW-USBN-2A which speaks JTAG so I guess I have what I need.That sounds do-able.PSEPM7128 look unobtainable via my regular channels

author: AK6DN
author_rank: Regular Contributor
timestamp: March 17, 2023, 01:31:54 am
content: Quote from: NivagSwerdna on March 16, 2023, 04:07:45 pmI use the Microchip/Atmel ATDH1150USB (google it) USB to 10pin JTAG USB programming cable with the Atmel download/programming tool.See MicroChip website. Not sure the Lattice USB programmer cable would work with the Atmel programming software.Same issue with Altera/Intel. You need the USBBlaster JTAG programmer cable or equivalent and the Quartus Programmer tool for MAX devices.And yes the Atmel ATF1504AS is basically the same architecture (and pinout) as the Altera MAX7064S device. I use it in a PLCC44 package.EPM7064S and ATF1504AS are basically identical parts, functionally and pinout. ATF15xx has some extra features you can enable if you developusing the Atmel native software (ie, CUPL based) but I prefer to treat it as a plug compatible replacement for the EPM7064S.I do development in Verilog using Quartus 13.0sp1 Web version (still available for free download, works on Win10, or the linux version).It produces the POF image file that can be used with the Quartus Programmer and a USBBlaster cable to program a real EPM7064S, for example.Or I use the Microchip/Atmel POF2JED tool to transform the POF file to a JED file for use in programming the ATF1504AS part,using the ATDH1150USB cable with the Microchip/Atmel ATMISP (google it) programming software.

author: AK6DN
author_rank: Regular Contributor
timestamp: March 17, 2023, 04:09:11 am
content: Quote from: edavid on March 17, 2023, 02:04:56 amDepends on the function needed, which is not well described. An ATF1502AS (equivalent to an EPM7032S) is only US$3.50 in a PLCC44. ATF1504AS (EPM7064S) is about US$4.75.Put it on a little carrier board wired up to the DIP28 footprint and program it as needed.

author: woofy
author_rank: Frequent Contributor
timestamp: March 17, 2023, 09:31:46 am
content: I would suggest you first find out how much logic resources you actually need before trying to select a device. As you are already familiar with Lattice devices, I would suggest an HX8K board. The HX has 5v tolerant inputs (data sheet says not, but it is). You just need level shift on the outputs and possible not even then as 3.3v outputs will drive 5v ttl inputs. Once you have sorted out all the logic you will be in a much better place to choose a real 5v device.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 17, 2023, 09:44:53 am
content: So... I sacrificed sleep for verilog... (quite tired now)...Got some working verilog... and did a functional simulation and it is looking good.For this design essentially it is 4-off 74LS194 and 1-off 74LS157 if you were to use 74-series. The actual verilog is simpler as the actual function is a subset.Seems to fit easily in a EPM7064SLC44-7The simulation suggests it is actually doing something....I just sort of grabbed ports and pins... I need to read the datasheet to understand if I should be using the square boxes.I'm happy to invest in that programmer if required. There is also a dev kit which I could probably sneak into the entertainment budget...https://www.kanda.com/products/Kanda/ATF15XX-DK3-U.htmlThis definitely seems like the right approach.PSI cannot get inline images to work... never mind.

author: AK6DN
author_rank: Regular Contributor
timestamp: March 17, 2023, 07:03:40 pm
content: Quote from: NivagSwerdna on March 17, 2023, 09:44:53 amYou might even try targeting an EPM7032S (ATF1502AS) if your macrocell usage is below 32 cells..... I now see that your macrocell usage in the pic in the prior post is only 20 of 64 cells, so a 32 cell EPM7032S (ATF1502AS) should work too.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 17, 2023, 07:31:52 pm
content: As most of the pins are inputs, I'd avoid the hassle of finding 5V parts, use resistors (e.g. in 4-way resistor networks) to get to 3.3v level and an HCT buffer to convert the outputs back to 5VHow fast does it actually need to be? Could you use something like an 8-bit PIC?

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 17, 2023, 10:34:46 pm
content: Quote from: mikeselectricstuff on March 17, 2023, 07:31:52 pmAround 7MHz, worst case.

author: c64
author_rank: Frequent Contributor
timestamp: March 20, 2023, 12:43:57 am
content: I would choose ATF15xxAS. Still in production (not cheap though), but you can also get cheap second hand from ali / ebay.If you are into TH packages, can choose PLCC with TH adapterIf you decide to buy second hand Altera 7000S, test it as soon as you receive. It may have JTAG disabled, and you need very expensive programmer to enable it back. ATF15xxAS with disabled JTAG are easy to enable with 12V and resistor.And of course if design is very simple, few ATF16v8 or ATF22v10 could be enough - they are also still in production and second hand available anywhere

author: coromonadalix
author_rank: Super Contributor
timestamp: March 20, 2023, 01:07:36 am
content: and for the atf15xx you have some kanda programmersbut sadly the price went up a little bithttps://www.kanda.com/CPLD-Programmers.175.htmlwe used the ATF1504 to replace the 9572xl plcc84 variantwith the kanda programmer we could load an JED file ... but not sure if they had some conversion etc ... not sure it was the Xilinx JED file ??

author: MarginallyStable
author_rank: Regular Contributor
timestamp: March 20, 2023, 05:40:05 pm
content: QuoteThis is really cool!! I loved the MAX7000 devices.