Can FPGA/CPLD Replace PIC for Faster Laboratory Timers?

In summary, the Microchip PICs cannot handle 5ns instruction cycles. The Quartus toolchain is a piece of eclectic patchwork and it spews out un-googleable error messages with every click of the mouse. Alternatives such as using faster PICs or a CPLD/FPGA might work.
  • #1
Abimbola1987
83
13
Dear Sirs,

I'm using Microchip PIC's as programmable laboratory timer among other things, but the 100ns instruction cycles are not adequate anymore. So I thought of beefing it up with a 5M40Z MAX-V CPLD which has 5ns end-to-end delay, bought the programmer and downloaded the Quartus Prime Lite Edition software, and everything came to a grinding halt.

The Quartus toolchain is a piece of eclectic patchwork and it spews out un-googleable error messages with every click of the mouse. I'm not complaining about the Altera Hardware Description Langauge (AHDL), it's the Integrated Development Environment (IDE) that's the culprit here.

Question: Can anyone suggest some alternatives? It has to be cheap and work out of the box?

Best regards
Abim
 
Engineering news on Phys.org
  • #2
Abimbola1987 said:
Dear Sirs,

100ns instruction cycles are not adequate anymore.

What timing resolution do you actually require?

P.S. I don't think PF users are required to be male.
 
  • #3
Abimbola1987 said:
The Quartus toolchain is a piece of eclectic patchwork and it spews out un-googleable error messages with every click of the mouse.
Maybe start a separate thread with some of those errors you are seeing -- we might be able to help you get past them. I have used earlier versions of their toolchains.

BTW, are you using their "lite" version? http://fpgasoftware.intel.com/?edition=lite
 
  • Like
Likes Abimbola1987
  • #4
GrahamN-UK said:
What timing resolution do you actually require?

I had chosen 5ns as acceptable, less is even better but then the price unfortunately goes up.

GrahamN-UK said:
P.S. I don't think PF users are required to be male.

If you are referring to my use of "Dear Sirs" then firstly there is no specific gender requirement in that term, it is a civilized and colloquial greeting when addressing a predominantly male audience, which I believe PF is. As to political correctness I'm siding with Mr. Jordan Peterson.
 
  • #5
berkeman said:
Maybe start a separate thread with some of those errors you are seeing -- we might be able to help you get past them. I have used earlier versions of their toolchains.

If you believe that PF would not suffer from multiple threads about that topic, then I will try and install it again.

berkeman said:
BTW, are you using their "lite" version? http://fpgasoftware.intel.com/?edition=lite

Yes, I used the Lite version.
 
  • #6
Abimbola1987 said:
If you believe that PF would not suffer from multiple threads about that topic, then I will try and install it again.
Oh sorry, did I miss a thread already where you were asking for CPLD/FPGA help? Can you give ma a link?
 
  • #7
berkeman said:
Oh sorry, did I miss a thread already where you were asking for CPLD/FPGA help? Can you give ma a link?

no, I'm asking you if that would be acceptable for PF, I don't want to flood the forum with such commercial product specific questions.
 
  • #8
Abimbola1987 said:
no, I'm asking you if that would be acceptable for PF, I don't want to flood the forum with such commercial product specific questions.
I think it would be fine. You can post screenshots of what you are trying to do and what errors you are getting. I may download the lite version just to check it out...
 
  • #9
Abimbola1987 said:
Dear Sirs,

I'm using Microchip PIC's as programmable laboratory timer among other things, but the 100ns instruction cycles are not adequate anymore. So I thought of beefing it up with a 5M40Z MAX-V CPLD which has 5ns end-to-end delay, bought the programmer and downloaded the Quartus Prime Lite Edition software, and everything came to a grinding halt.

Can you just use faster PICs?

The table at https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en588853 lists 200 and 252 MHz 32-bit PICs with 4 x 32-bit counter/timers which should meet your 5 ns resolution requirement. Using a fast PIC with a familiar toolchain might offset using a part which is otherwise over-specified for your requirement.
Abimbola1987 said:
If you are referring to my use of "Dear Sirs" then firstly there is no specific gender requirement in that term, it is a civilized and colloquial greeting when addressing a predominantly male audience, which I believe PF is.

I was. "Sir" is a specifically male greeting (unlike "Guys" - at least in some quarters). Whilst I agree that PF is likely to be predominantly male there's no need to unnecessarily discourage female (or, more generally, non-male) readers. (The make-up of the audience does vary across the various PF fora; there are more female screen names visible in the biology and teaching fora than here in EE.)
 
  • #10
GrahamN-UK said:
Can you just use faster PICs?
I think the OP is also trying to learn more about electronics in general, so picking up CPLD/FPGA design skills would be a plus. Hopefully the issues he is seeing with the toolchain are just basic user interface and conceptual issues.
 
  • #11
GrahamN-UK said:
I was. "Sir" is a specifically male greeting
Very culture dependent.
 
  • #12
GrahamN-UK said:
Can you just use faster PICs?

The table at https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en588853 lists 200 and 252 MHz 32-bit PICs with 4 x 32-bit counter/timers which should meet your 5 ns resolution requirement. Using a fast PIC with a familiar toolchain might offset using a part which is otherwise over-specified for your requirement.

Yes I could use a faster chip and I did consider that, but then it would be useful only as a timer and not "among other things" e.g. burst read from ADC. With the CPLD I can evaluate a condition and set bit pattern on output all within 5ns, and that would be wonderful if I could do that for just €1 for the chip and €3 for the programmer.

I have also looked at https://tinyfpga.com/ which is sort of the Arduino of FPGA's with a community of users, but the CPLD won me over having more features than a FPGA.

GrahamN-UK said:
I was. "Sir" is a specifically male greeting

I'm sorry if I didn't make my position clear on the subject of political correctness, please allow me to rephrase: I do not wish to discuss political correctness with anyone on the internet. if I had that desire, there are plenty of other fora where I would have ample opportunity to increase my blood pressure, PF is certainly not the right forum for such desires.
 
  • Like
Likes Tom.G
  • #13
berkeman said:
I think the OP is also trying to learn more about electronics in general, so picking up CPLD/FPGA design skills would be a plus. Hopefully the issues he is seeing with the toolchain are just basic user interface and conceptual issues.

One fine day when I was meticulously soldering SMD logic gates to my SMD PIC, I realized that it was a complete waste of time and I had to expand my skill set with CPLD/FPGA design skills.

I will be reverting shortly with a new post as you suggested.
 
  • Like
Likes berkeman
  • #14
berkeman said:
I think the OP is also trying to learn more about electronics in general, so picking up CPLD/FPGA design skills would be a plus. Hopefully the issues he is seeing with the toolchain are just basic user interface and conceptual issues.

OK, so I managed to download and install the Quartus software, make a "Hello World" design and successfully compile it without errors, and that makes me Bob's nephew.

This time the software was available from the intel website, the download was painstakingly slow and cumbersome, but the install went without problems. First it wouldn't launch because of some shared libs missing, fixed that and Quartus popped up on my screen.

Found this hello world guide which I can recommend for first timers.

I noticed that Quartus had evolved to the better since last time I tried it, it's more intuitive and less clutter, so I expect plain sailing from here on. But I reserve my right to post questions when I eventually hit a snag.

Thank you.
 
  • Like
Likes berkeman
  • #15
Great news! :smile:
 
  • #16
  • Like
Likes Abimbola1987
  • #17
eq1 said:
I've found FTDI modules are great for these types of applications. You can get lots of pins, great data rates, and since the logic runs on the host, complex behaviors, all for little money (~$40). Just a USB port is needed and no IDE. And there is a ton of example code out there in a variety of programming languages.

https://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_FT2232H_Mini_Module.pdf

Thank you, I had a look at it, unfortunately it's too black-boxy for me, and it is Windows oriented, I'm using Linux.
 
  • #18
Abimbola1987 said:
it's too black-boxy for me, and it is Windows oriented, I'm using Linux.

They work on linux too. The biggest problem is that getting sub-ms timing over USB would be wildly optimistic if not downright impossible and that is way slower than you need.

FPGA/CPLD is probably the way to go as you have already found.

BoB
 
  • Like
Likes Abimbola1987

Related to Can FPGA/CPLD Replace PIC for Faster Laboratory Timers?

1. What is an FPGA/CPLD?

An FPGA (Field-Programmable Gate Array) and CPLD (Complex Programmable Logic Device) are types of integrated circuits that can be programmed to perform various digital logic functions. They are commonly used in electronic devices and systems for their flexibility and ability to be reprogrammed.

2. What are the main differences between an FPGA and CPLD?

The main difference between an FPGA and CPLD is their architecture. FPGAs are made up of a large number of programmable logic blocks, while CPLDs have a smaller number of logic blocks. This means that FPGAs are better suited for complex designs with a high number of logic elements, while CPLDs are better for simpler designs with fewer logic elements. Additionally, FPGAs have a higher capacity for parallel processing compared to CPLDs.

3. How are FPGAs and CPLDs programmed?

FPGAs and CPLDs can be programmed using a Hardware Description Language (HDL) such as Verilog or VHDL. These languages allow the user to describe the desired logic functions and then the design is synthesized and implemented on the FPGA or CPLD. Alternatively, some FPGAs and CPLDs can also be programmed using a graphical user interface (GUI) and a hardware design tool provided by the manufacturer.

4. What are some common applications of FPGAs and CPLDs?

FPGAs and CPLDs are used in a wide range of applications, including telecommunications, industrial control systems, medical devices, and consumer electronics. They are also commonly used in prototyping and testing of digital circuits, as well as in research and development projects.

5. What factors should I consider when choosing between an FPGA and CPLD?

When choosing between an FPGA and CPLD, some important factors to consider include the complexity of the design, the required speed and performance, power consumption, and cost. FPGAs are generally more expensive but offer higher capacity and performance, while CPLDs are more cost-effective for simpler designs. It is also important to consider the available development tools and support from the manufacturer for your specific application.

Back
Top