The semester is wrapping up at Cornell, and that means it’s time for the final projects from [Bruce Land]’s lab. Every year we see some very cool projects, and this year is no exception. For their project, [Andre] and [Scott] implemented the audio processing unit (APU) of the Nintendo Entertainment System (NES). This is the classic chiptune sound that regaled a generation with 8-bit sounds that aren’t really eight bits, with the help of a 6502 CPU that isn’t really a 6502 CPU.
Unlike the contemporaneous MOS 6581 SID, which is basically an analog synthesizer on a chip, the APU in the NES is extraordinarily spartan. There are two pulse wave channels, a triangle wave channel, a random noise channel, and the very rarely used delta modulation channel (DMC) used to play very low quality audio samples. This is a re-implementation of the NES APU for a university lab; it is very understandable that [Andre] and [Scott] didn’t implement the rarely used DMC.
Everything about the circuitry of the NES is well documented, so [Andre] and [Scott] had a great wiki for their research. At the highest level, the APU runs on a 894kHz clock and controls three channels through dedicated registers. These outputs are fed through a mixer, which the guys scaled and combined into a 16-bit output played through a Wolfson WM8731 audio codec.
After implementing the NES APU, [Andre] and [Scott] added an SD card reader that can read the Nintendo Sound Format – the standard distribution format for NES chiptunes – and emulated a 6502 to control the registers. The result is a relatively simple device that plays NES chiptunes with amazing accuracy. The sound files on the project report sound like the real thing, but this is entirely emulated on modern hardware.
The student projects that come out of [Bruce Land]’s microcontroller- and FPGA-programming classes feature here a lot, simple because some of them are amazing, but also because each project is a building-block for another. And we hope they will be for you.
This time around, [Junyin Chen] and [Ziqi Yang] created a five-in-a-row video game that is controlled by a pointing finger. A camera, pointed at the screen, films the player’s hand and passes the VGA data to an FPGA. And that’s where things get interesting.
An algorithm in the FPGA detects skin color and, after a few opening and closing operations, comes up with a pretty good outline of the hand. The fingertip localization is pretty clever. They sum up the number of detected pixels in the X- and Y-axis, and since a point finger is long and thin, locate the tip because it’s going to have a maximum value in one axis and a minimum along the other. Sweet (although the player has to wear long sleeves to make it work perfectly).
How does the camera not pick up the game going on in the background? They use a black-and-white game field that the skin-color detection simply ignores. And the game itself runs in a Nios embedded processor in the FPGA. There’s a lot more detail on the project page, and of course there’s a demo video below.
We love to follow along with Prof. Land‘s classes. His video series is invaluable, and the course projects have been an inspiration.
Continue reading “Real-Time FPGA Finger Detection”
[Bruce Land] is no stranger to Hackaday as you can see from his Hackaday.io profile, if you aren’t familiar with his work [Bruce Land] is a Senior Lecturer at Cornell University. One of the courses he teaches: Digital Systems Design Using Microcontrollers (ECE4760) was recorded in 2012 and again in 2015 and the videos are available on YouTube.
AVR to PIC32
[Bruce Land]s previous set of ECE4760 lectures (2012) used an Atmel ATmega1284 AVR Microcontroller for the laboratory portion of the course. This means the lectures are also based on the AVR and if you haven’t watched them through a few times you should do. The recently updated set of lectures is based on the Microchip PIC32, more specifically the Microstick II.
You can follow the ECE4760 rabbit hole as far as you want with all the available content provided by [Bruce Land] on his ECE4760 course webpage. You can watch the ECE4760 lectures on YouTube, try your hand at the homework assignments, and work through the labs at your own pace.
New Lectures = New Shirts
One area that [Bruce Land] is unmatched and arguably uncontested is his shirt collection, we are continuously impressed with these original works and wish they were available for purchase (wink/hint c’mon [Bruce] throw us a bone!). If you don’t know why the rest of us aren’t able to obtain the wonderful shirts [Bruce Land] wears you clearly aren’t subscribed to [Bruce Land]s YouTube channel, you should rectify that wrong and log some ECE4760 lecture hours starting with the video after the break.
C’mon, you know you’re not really going to do much today. You might as well spend that time learning some skills instead of watching funny cats. The Cornell ECE lectures on microcontrollers (ECE 4760 and ECE5760), taught by [Bruce Land], are available online for free.
Not only do you get to enjoy these two courses, but there are videos available showing off several different categories of student projects as well.
Continue reading “Lazy Labor day educational time. Watch Cornell’s microcontroller courses.”