[PK] is working on a very simple video card, meant to output 640×480 VGA with a cheap CPLD. The interface will be 5 Volt SPI, meaning there’s a ton of potential here for anyone wanting put a reasonable (and cheap) display in a microcontroller project. The project has come a long way, and his latest update showcases something that has only been done once before: color NTSC with programmable logic
The brains of the outfit is a $5, 100-pin CPLD from Xilinx. Apart from that, the rest of the components are a crystal, PLL, and an almost hilarious number of resistors for the R2R ladder. The one especially unique component is the 25.056815 MHz crystal – multiply by that by two, and it’s fast enough to drive a VGA monitor. Divide the crystal by seven, it’s the 3.579545 MHz you need for an NTSC colorburst frequency. That’s VGA and NTSC in a single programmable logic project, something the one FPGA project we could find that did color NTSC couldn’t manage.
The next step in the project is designing a PCB and figuring out the code for the framebuffer. [PK] put up a demo showing off both VGA and NTSC; you can check that out below.
The project featured in this post is an entry in The Hackaday Prize. Build something awesome and win a trip to space or hundreds of other prizes.
Continue reading “THP Entry: A CPLD Video Card With VGA And NTSC”
Flappy Bird has been ported to just about every system imaginable, including but not limited to the Apple II, Commodores, pretty much every version of the Atari, and serves as a really great demonstration of the TI-99’s graphics capabilities. Porting is one thing, but having a computer automate Flappy Bird is another thing entirely. [Ankur], [Sai], and [Ackerly] in [Dr. Bruce Land]’s advanced microcontroller design class at Cornell have done just that. They’re playing Flappy Bird with a camera, FPGA, and a penny wired up to a GPIO pin to guide the little 8-bit-bird through Mario pipes.
The setup the team is using consists of a webcam that records the screen of a smartphone, an FPGA, and a little bit of circuitry to emulate screen taps. Inside the FPGA, the team is looking at the video stream from the phone to detect the bird, pipes, and gaps. The ‘tapper’ unit is a US penny, placed right above the ‘tap’ button, wired to a GPIO port. This was found to be the ideal contact for a capacitive touch screen – taps that were too small weren’t registered, and taps that were too big registered as two taps.
For spending an entire semester on automating Flappy Bird, the team has a lot of knowledge to show for it, but not the high score: the bird only makes it through the first pipe 10% of the time, and the second pipe 1% of the time. The high score is three. That’s alright – getting the algorithm right to play the game correctly was very, very difficult, and to nail that problem down, they estimate it would take at least another semester.
Don’t like sunglasses? Deal with it. They’re the pixeley, retro sunglasses from your favorite animated .GIFs, made real in laser cut acrylic. Points of interest include heat-bent frames made out of a single piece of acrylic.
Remember this really small FPGA board? The kickstarter is ending really soon and they’re upgrading it (for an additional $30) with a much better FPGA.
Sparkfun is now hosting the Internet of Things. They’re giving people a tiny bit of space to push data to, and you can also deploy your own server. That’s interesting, and you can expect us doing a full post on this soon.
Need waveforms? [Datanoise] is building a wavetable synthesizer, and he’s put all his waveforms online. Now if we could just get a look at the synth…
If you only have $20 to spend on a board, you’ll want to pick up at Teensy 3.1. [Karl] wrote some bare metal libraries for this awesome board, and while it’s not as extensive as the standard Arduino libs, it’s more than enough to get most projects off the ground. Included are UARTs, string manipulation tools, support for the periodic interval timers on the chip, and FAT and SD card support.
During one of [Michael]’s many forum lurking sessions, he came across a discussion about frequency counting on a CPLD. He wondered if he could do the same on an FPGA, and how hard it would be to count high clock rates. As it turns out, it’s pretty hard with a naive solution. Being a bit more clever turns the task into a cakewalk, with a low-end FPGA being able to count clocks over 500 MHz.
The simplest solution for counting a clock would be to count a clock for a second with a huge, 30-bit counter. This is a terrible idea: long counters have a lot of propagation delays. Also, any sampling would have to run at least twice as fast as the input signal – not a great idea if you’re counting really fast clocks.
The solution is to have the input signal drive a very small counter – only five bits – and sample the counter using a slower clock on board the FPGA. [Michael] used a 5-bit Gray code, getting rid of the problem of the ‘11111’ to ‘00000’ rollover of a normal binary counter.
Because [Michael] is using a 5 bit clock with 31 edges sampled at 32 MHz, he can theoretically sample a 992 MHz clock. There isn’t a chance in hell of the Spartan 6 on his Papilio Pro board ever being able to measure that, but he is able to measure a 500 MHz clock, something that would be impossible without his clever bit of code.
Over on the University of Reddit there’s a course for learning all about FPGAs and CPLDs. It’s just an introduction to digital logic, but with a teacher capable of building a CPLD motor control board and a video card out of logic chips, you’re bound to learn something.
The development board being used for this online course is an Altera EMP3032 CPLD conveniently included in the Introduction to FPGA and CPLD kit used in this course. It’s not a powerful device by any measure; it only has 32 macrocells and about 600 usable gates. You won’t be designing CPUs with this thing, but you will be able to grasp the concept of designing logic with code.
Future lessons include building binary counters, PWM-controlled LEDs, and a handheld LED POV device. In any event, it’s a great way to learn about how programmable logic actually works, and a fairly cheap way to get into the world of FPGAs and CPLDs. Introductory video below.
Continue reading “An Online Course For FPGA And CPLD Development”
There have been quite a few boards put out in recent months with an FPGA, some RAM, Flash, and a bunch of I/O, the working theory being FPGAs are the new hotness, ready to steal the crown from Arduino and put a programmable logic development board in the hands of millions. We’re not so sure that’s going to happen. but Scarab Hardware’s miniSpartan6+ board does look pretty nice, and has more than enough on board to serve as anyone’s first FPGA platform. It’s also one of the first FPGA boards we’ve seen that is breadboard friendly. Nice touch.
This tiny board features a Spartan6 LX9 FPGA, with just under 10,000 logic cells. An FPGA platform is useless without some sort of IDE, so the Scarab Hardware folks have taken the Mojo IDE, improved the GUI, added a few libraries, and rolled everything up into a ‘not the Arduino IDE, but as simple and better’ platform.
Right now, the crowdfunding campaign for the miniSpartan6+ is well over 200% funded with a little less than a month to go. The stretch goals the team have in mind – a very likely probability, given what they’re asking – include a faster FPGA, a higher resolution ADC, and support for HDMI input and output. That last bit – HDMI input – will allow anyone to do some cool things like overlaying video with HDMI for a pretty reasonable cost.
Why not round out our two-week Bay Area Maker Faire coverage with a Links post? This time around it’s video links. We mixed together a bunch of interesting clips that didn’t get their own video, as well as a dose of what it feels like to walk around the Faire all weekend. Join us after the break for the links.
Continue reading “Video Links: Hunting for Hacks at Maker Faire”