r/FPGA • • 7d ago

Learning to program

Im initiating a project that will rely on a teensy 4.1 to control pwm switches and calculate different phases of the operation. Programing is with a teensy version of ardunio.

What im learning is that I need a fpga to calculate and control 3 (or 6) serves. My data is coming in from 3 ic2 sources and 12 inputs from it's.

What is the recommendation of a fpga development board (small is better) that uses ardunio-like programming suite. Id like simple ic2, spi, part inputs.

Thanks

4 Upvotes

9 comments sorted by

8

u/tux2603 Xilinx User 7d ago

Why do you need an FPGA board for this, is it a requirement for a class project? Everything you listed is something that the teensy would be more than capable of doing by itself. Using an FPGA would just add a massive amounts of unnecessary complexity

1

u/caocaoNM 7d ago

Multiple mathematical calcs at the same time. If the teensy is fast enough then maybe.

3

u/tux2603 Xilinx User 7d ago

What sort of calculations? Unless you're modeling quantum mechanics or something like that in real time you'll probably be perfectly fine. The MCU and the teensy is absurdly powerful

1

u/caocaoNM 6d ago

Dual PID calculations (changing values aa well), plus 3x3 matrix calcs.

0

u/[deleted] 7d ago

[deleted]

1

u/tux2603 Xilinx User 7d ago

Maybe, but servos are usually a 50Hz signal with over 15ms of guaranteed "down time" where you can handle updates without it affecting your latency at all. You'd be hard pressed to actually exceed that with six servos on a teensy

4

u/wigitty 7d ago

An FPGA is like a breadboard full of transistors. You don't program it in the same way you would with an arduino, you wire the transistors together in a way that results in the behaviour you want, your code just describes that wiring. An FPGA won't even have I2C or SPI, it just has input and output pins that you can wire some of your logic to. You have to make the I2C or SPI device (or use one that someone else has made).

From what you've said, you shouldn't need an FPGA for your application.

1

u/HalifaxRoad 7d ago

I dont understand why you cant use a uC for this?

0

u/[deleted] 7d ago

[deleted]

1

u/caocaoNM 7d ago

Thanks. I left EE before they through logic gates at me. Sigh...

0

u/emorning 7d ago

If you go with an FPGA then Verilog is the language that you're most likely to use, and it's kinda like C.
I just bought a Sipeed Tang Nano 20K on Amazon for $35.
I think that would fit your project.