Tinkering – FPGA


If you have been a long time follower, you might remember a flurry of activity in late 2015 and early 2016 when I was diving into tinkering with an Arduino board. At the time, I was building bits and pieces to make a remote weather station. (that was derailed by an unrelated life change, but I have slowly gotten back into it.)

The Arduino is interesting as it is a pretty complete SOC, with memory, microcontroller, CPU, and a pretty robust set of digital and analog IO’s. Plenty of cool things you can do with it, and it is really simple to program. Ordinary C code, solid libraries, and third parties make a pretty complete set of sensors and widgets, with libraries to support them.

Sparkfun and Adafruit are two reputable vendors, and they have plenty of cool bits, and tutorials to get you started, and pretty much up to an expert level.

That’s all well and good, but then there are these things that you hear about called FPGA’s. Field Programmable Gate Array. That is a mouthful, but conceptually it is pretty simple. It is a giant chip which can be programmed with logic blocs and circuits. Things like AND, OR, XOR, NOT gates, the building blocks of digital electronics. Infinitely configurable (of course, there are limits in size), but it is exactly the same as starting with a bread board, and connecting discrete components.

When I was in high school, I knew people who built discrete circuits. It was greek to me until I took an electronics lab at SJSU (where I made the connection between boolean logic and actual TTL digital circuits).

Why bring this up?

Mojo v3On a lark, I found a FPGA hobby board, called the Mojo board. Built around an open source design, it packages a Xilinx Spartan 6 FPGA with some SDRAM memory, with an Arduino chip for the USB and analog IO interfaces into a small board.

It has ample IO options, and even some LED’s built into the board for your use.

Made in the US, by Embedded Micro, it also has an IDE for development. Here is where it gets a bit shitty. Whereas the Arduino IDE is well supported on windows, linux, and mac, the FPGA bits are only supported on Windows and Linux (and apparently, the Xilinx tools are a bit wonky in Windows 10, so it is good that I am using a Windows 8.1 system).

Today, it arrived, and by following the basic tutorials on the Embedded Micro site, I got the basic bits working.

The Future

When I bought the board, I got a couple of accessories. One being an array of addressable LED’s that allow some cool projects (think music visualization), and one being a variety of input and output options. Something to keep me busy.

From the initial projects, it is crystal clear that my brain and the procedural programming needs to be rewired. As an example, one of the first projects is having one of the LED baks blink. In the Arduino world, you would turn it on, wait a preset time, then turn it off. However, with an FPGA, there isn’t “memory” or a main loop, but circuits. So you create a counter, and have it toggle between on and off when it overflows a preset number of bits. In some ways, that seems crude. But, it also has a degree of simplicity.

Will this help me with my goal of building a cool weather station? Probably not. Will it consume some time, and make me think? Oh yeah.

About the author


Product Manager in Tech. Guitar player. Bicycle Rider. Dog rescuer. Techie.

By gander


Subscribe to Tralfaz via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4 other subscribers
June 2017

Spam Blocked