Author Topic: A 5V CPLD in 2023?  (Read 3106 times)

0 Members and 1 Guest are viewing this topic.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
A 5V CPLD in 2023?
« on: March 15, 2023, 09:03:45 pm »
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 in

I 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)

PS
I 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
« Last Edit: March 15, 2023, 09:06:23 pm by NivagSwerdna »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #1 on: March 15, 2023, 09:24:21 pm »
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.
 

Offline _pat_

  • Contributor
  • Posts: 32
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #2 on: March 15, 2023, 09:34:34 pm »
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.
 
The following users thanked this post: NivagSwerdna

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4384
  • Country: dk
Re: A 5V CPLD in 2023?
« Reply #3 on: March 15, 2023, 09:39:10 pm »
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
 
The following users thanked this post: NivagSwerdna

Offline tchiwam

  • Regular Contributor
  • *
  • Posts: 134
  • Country: ca
Re: A 5V CPLD in 2023?
« Reply #4 on: March 15, 2023, 09:51:13 pm »
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...
 
The following users thanked this post: NivagSwerdna

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #5 on: March 16, 2023, 12:14:13 am »
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.
The ones I have seen seem to date back a few years and use un-obtainium parts.
 

Offline AK6DN

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #6 on: March 16, 2023, 02:06:16 am »
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.
« Last Edit: March 16, 2023, 02:16:35 am by AK6DN »
 
The following users thanked this post: edavid, NivagSwerdna

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: A 5V CPLD in 2023?
« Reply #7 on: March 16, 2023, 03:25:15 am »
19 voltage dividers for inputs? and a 4ch buffer for outputs? Or 3x SN74LVC8T245, which will cover 24 lines.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7638
  • Country: ca
Re: A 5V CPLD in 2023?
« Reply #8 on: March 16, 2023, 04:47:30 am »
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 in

I 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)

PS
I 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

What'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.
« Last Edit: March 16, 2023, 04:50:03 am by BrianHG »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7638
  • Country: ca
Re: A 5V CPLD in 2023?
« Reply #9 on: March 16, 2023, 04:59:26 am »
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/intel

11$ PLCC version, all 5v version, no VCCint regulator needed:
https://www.arrow.com/en/products/epm7128slc84-10n/intel

Depending on packaging and voltage, you can find the EPM7064 as cheap as 2$ in 44pin TQFP.
« Last Edit: March 16, 2023, 05:20:36 am by BrianHG »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #10 on: March 16, 2023, 10:43:33 am »
Look at the Atmel/Microchip ATF1502AS/ATF1504AS/ATF1508AS parts.
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.
That looks interesting.  I didn't realise you could do that.

What's wrong with 3x PAL or GAL22V10?
Not 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.
« Last Edit: March 16, 2023, 11:53:14 am by NivagSwerdna »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7638
  • Country: ca
Re: A 5V CPLD in 2023?
« Reply #11 on: March 16, 2023, 11:29:09 am »
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.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #12 on: March 16, 2023, 11:43:05 am »
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!
 
« Last Edit: March 16, 2023, 12:07:16 pm by NivagSwerdna »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #13 on: March 16, 2023, 04:07:45 pm »
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.

PS
EPM7128 look unobtainable via my regular channels

 

Offline AK6DN

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #14 on: March 17, 2023, 01:31:54 am »
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.

PS
EPM7128 look unobtainable via my regular channels



I 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 develop
using 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.
« Last Edit: March 17, 2023, 01:36:44 am by AK6DN »
 

Offline AK6DN

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #15 on: March 17, 2023, 04:09:11 am »
Could you use a 256Kx8 EEPROM (SST39SF020A) and a couple of 8 bit input latches?  That seems a lot simpler and cheaper than a CPLD/FPGA.

Depends 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.
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 320
  • Country: gb
    • Woofys Place
Re: A 5V CPLD in 2023?
« Reply #16 on: March 17, 2023, 09:31:46 am »
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.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #17 on: March 17, 2023, 09:44:53 am »
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.

1740401-0

Seems to fit easily in a EPM7064SLC44-7

The simulation suggests it is actually doing something....

1740407-1

I just sort of grabbed ports and pins... I need to read the datasheet to understand if I should be using the square boxes.

1740413-2

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.html

This definitely seems like the right approach.

PS
I cannot get inline images to work... never mind.
 

Offline AK6DN

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #18 on: March 17, 2023, 07:03:40 pm »
...
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-7
...

You 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.
« Last Edit: March 17, 2023, 11:25:40 pm by AK6DN »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13677
  • Country: gb
    • Mike's Electric Stuff
Re: A 5V CPLD in 2023?
« Reply #19 on: March 17, 2023, 07:31:52 pm »
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 5V

How fast does it actually need to be? Could you use something like an 8-bit PIC?
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: A 5V CPLD in 2023?
« Reply #20 on: March 17, 2023, 10:34:46 pm »
How fast does it actually need to be? Could you use something like an 8-bit PIC?
Around 7MHz, worst case.
 

Offline c64

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: au
Re: A 5V CPLD in 2023?
« Reply #21 on: March 20, 2023, 12:43:57 am »
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 adapter

If 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
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 5780
  • Country: ca
Re: A 5V CPLD in 2023?
« Reply #22 on: March 20, 2023, 01:07:36 am »
and for the atf15xx   you have some kanda programmers

but sadly the price went up a little bit

https://www.kanda.com/CPLD-Programmers.175.html


we used the ATF1504  to replace the 9572xl  plcc84 variant

with 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 ??
« Last Edit: March 20, 2023, 01:09:47 am by coromonadalix »
 

Online MarginallyStable

  • Regular Contributor
  • *
  • Posts: 65
  • Country: us
Re: A 5V CPLD in 2023?
« Reply #23 on: March 20, 2023, 05:40:05 pm »
Quote
Look at the Atmel/Microchip ATF1502AS/ATF1504AS/ATF1508AS parts..
Compatible with legacy Altera MAX7000 series parts.

This is really cool!! I loved the MAX7000 devices.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf