CPLD/FPGA Programming for an Arduino Kind of Guy

For the past month I have been learning to program FPGAs. I had been thinking about doing this for a while, but couldn’t figure out how to get started. As it turns out, it isn’t too hard to do, but I needed something that would guide me through the whole process.

I started by reading Verilog By Example:


This is a very short, but well laid out book that explains the basics of programming FPGAs in Verilog. Once a bit of the mystery started to go away, it was time to try my hand at real hardware.

I followed the lessons found at


and purchased their parts kit as well:


The tutorial is designed to program an Altera MAX3000A CPLD. CPLDs are simpler versions of FPGAs. They don’t have as many logic gates but they also have the advantage of retaining their progamming when power is off.

For the most part, this was a very well done set of lessons that will get you through all of the fundamentals.

I purchased the tutorials on DVD and that was a waste. At DVD’s resolution of 720p, I really could not read the text. The same lessons are available on youtub in 1080p and those were crisp enough to allow reading the CRT.

My only issue was with the 3.3v 7555 clock being used. For reasons I still don’t understand, the MAX3000A didn’t seem to see all of the clock cycles unless I pushed it up to 5V. The tutorial works fine in 3.3V and I couldn’t find any other complaints like this.

I asked the tutorial author about this. He gave me a few suggestions to try and then went silent. Not that I expect hand-holding from what is essentially free training, but I am still perplexed as to the issue. None of the lessons using the clock worked properly for me at 3.3V – and that was with replacing all of the hardware – just in case.

I also went to the Altera website and did some of their free online training.

I am grateful to Pyro Electronics and Altera for making the educational materials free and for making the software tools free. This has purely been an exercise in curiosity. I have found it very interesting, but would never have been able to justify spending $100’s or $1000’s. $40 was just about perfect.

I now have enough knowledge of the process that I have purchased a better CPLD (several Altera MAXII models) and a couple of VHDL books (and a few Verilog books will be forth coming as well).


This entry was posted in c-fpga and tagged . Bookmark the permalink.

2 Responses to CPLD/FPGA Programming for an Arduino Kind of Guy

  1. Sean Straw says:

    As it happens, just yesterday I returned four Altera V GX series FPGA dev kits to a hardware project manager at my employer, since the project they were being used for has gone to the next stage. They’re used to emulate ASIC functionality in early product design before the ASICs are fabbed (since that’s a very costly process). The basic dev kits are US$850 a pop, whereas the full-on dev kits are about $4K a pop. Neat boards with quite a variety of interfaces onboard, but the pricing makes it difficult to justify for hobby use.

    I have several Technologic Systems TS-7800 PCBs in my shop, which I’ve yet to put to use – these are 500MHz ARM9 embedded linux boards, with serial, LCD output, gig ethernet, two USB 2.0, two SATA, 128M DRAM, 512M NAND Flash, 2x SD card, and a GPIO header, plus a 12K FGPA (which isn’t a huge FPGA, but is there so one can facilitate other hardware interfaces through the GPIO) . These boards are advertised in Circuit Cellar, Elektor, and the like, for circa US$250, and are largely intended for environments where someone needs an embedded controller board but doesn’t want to have to do the design and fab of one.

    Perhaps this summer, I’ll be able to get the time to fire up the dev setup and re-flash one of these. You could think of them sort of like a precursor to the BeagleBone, but with an older generation CPU, less memory, and a lot more I/O options. 4W consumption and runs at 5V, 200uA in standby (which, while not as low as an ATTiny in sleep mode, ain’t too shabby for a embedded linux system).

    I note though that Altera sells the EPM3032 series CPLDs (the bare chip) in various configurations for circa US$1.50-3.00, which makes them attractive for churning a low parts count project.

  2. Bill Buzzell says:

    I highly recommend you take a look ProjectOberon. It has it ALL. You have a complete RISC5 “virtual processor” which runs on an FPGA plus the Oberon OS and also the excellent compiler…all in less than 10k lines of code. The whole system fits in less than 2mb. The compiler is amazing and compiles code instantly. Professor Wirth has done a great job on documenting everything from top to bottom.
    The is also the RISC5 ‘soft core’ processor which is a more typical microcontroller vs the full graphical desktop that ProjectOberon is. Search ‘Astrobe Oberon RISC5’.
    Also, there is a little language called PICL, which is a tiny little compiler for the PIC16C84 microcontroller. The whole language is @700 and that includes the flashing/uploader .
    All you need is the right FPGA setup specifically for the full ProjectOberon (it needs 1mb+ 10ns ram). You can get the Pepino or the Pipistrello from Saanlima Electronics. This is an amazing FPGA source. The owner, Magnus, is an ace FPGA programmer and builds quality boards. There is also the OberonStation, which built for ProjectOberon.

    I have several of the Pipistrello boards. One is a full time 32 channel logic analyzer, which happens to be the best deal around, if you need more than a low end logic analyzer. I haven’t tried the Pepino yet but it is the better way to go. It was engineered for Oberon whereas the Pipistrello was retrofitted with add on cards for the ram to an existing ‘general purpose’ FPGA board.


    I bet you could learn all of PICL in a day with this one document

    Click to access PIC.pdf

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.