Dabbling with CPLD generated VGA signals

posted May 5th 2011 1:01pm by
filed under: Microcontrollers

It seems like all the cool kids are leaving the 8-bit hobby microcontrollers in the parts bin and playing with more advanced parts like Complex Programmable Logic Devices. [Chris] is no exception to the trend, and set out to generate his own VGA signal using one of the beefy semiconductors.

It seems that he’s using the acronyms CPDL and FPGA interchangeable in his post but according to the parts list this setup uses an Altera EPM7128SLC84-7N CPLD. In order to generate the VGA signal he needed a way to convert the digital signals from the chip into the analog values called for in the video standard. He chose to build a Digital Analog Converter for the RGB color values using a resistor network which he calculated using PSpice. The other piece in the puzzle is a 25.175 MHz oscillator to clock the CPLD. As you can see after the break, his wire-wrapped prototype works exactly as designed. The example code generates the rainbow bars seen above, or a bouncing box demo reminiscent of a DVD player screen saver.

Want to know more about programming CPLDs? We did a tutorial on the subject a while back.

Read the rest of this entry »

Your first Digital to Analog Converter build

posted Feb 17th 2011 10:00am by
filed under: Microcontrollers

Have you ever built a Digital to Analog Converter before? This is a circuit that can take the 0 or 5V coming off of several digital logic pins, combine them together, and spit out one analog voltage that represents that value. If you’ve never made one, here’s your chance. [Collin Cunningham] over at Make put together another lab video about DACs which we’ve embedded after the break.

The circuit above uses an R-2R resistor network – often called a resistor ladder – which you can learn much more about from the reference page that [Collin] links to. Although a DAC in an IC package is by far the most commonly found application, we do see these R-2R networks in audio hacks from time to time.

Read the rest of this entry »




Intro to Circuit Bending

posted Jan 11th 2011 3:00pm by
filed under: digital audio hacks, how-to, musical hacks, toy hacks

Electronic musical instruments are a lot of fun for a hacker because, with a small palette of tools, know-how and curiosity, they are easily modified. As with any hack, there is always the chance that the subject will be ruined, so it’s not necessarily worth the risk to muck about inside your thousand-dollar pro synthesizer. Luckily for all of us, there are shovel-fulls of old electronic musical toys littering the curbs and second-hand shops of the world. These fun little devices provide ample opportunity to get familiar with audio electronics and circuit bending techniques.

A note on definitions: the term “circuit bending” can be synonymous with “hardware hacking” in the world of audio electronics, and we have seen some debate as to which term is better suited to a given project. We welcome you to share your viewpoints in the comments.

Keep reading to get started.
Read the rest of this entry »

Android Talks Pulsewave

posted Nov 10th 2010 5:16am by
filed under: android hacks, digital audio hacks, portable audio hacks

Serial communications are a mainstay of digital computing. They don’t require much physical infrastructure and they exist in variations to fit almost any application. The behaviour of serial communications lines, varying from high to low voltage in a timed pattern, is analogous to a 1-bit DAC. Using a whole DAC for serial communication would be a waste in most cases, but the [RobotsEverywhere] team found an exception which you may have encountered already.

Since the audio output of the Android is accessible and addressable, [RobotsEverywhere] wrote source code to use the left and right channels as separate serial communication lines. This circumvents the need to bust into the device and muck about with the hardware which is great if you want a no-risk hack that allows communications to an RS232 port. Any hardware on which you can write to the DAC (and control the sampling rate) is a potential target.

There are some external electronics required to convert the audio signal to TTL, but it’s not very complicated–a couple of comparators and change. You can see it in action after the break.

As a bonus, when you’re done for the day you can plug in your headphones and listen to the soothing poetry of pulse waves all night long.

Read the rest of this entry »

PIC programmable power supply

posted Oct 6th 2010 8:58am by
filed under: tool hacks

This programmable power supply is the perfect addition to your bench tools. [Debraj Deb], who previously built a whole house power monitor, designed this build around a PIC 18F4520 microcontroller. The desired voltage is set with an attached keypad, resulting in a digital output on the 8-bits of port D. The port connects to another protoboard with an R-2R digital-to-analog converter resulting in the target voltage. A set of transistors amplifies the current and a power transistor then takes care of the final output. After the break you’ll find two videos, the first walks us through the hardware and the second demonstrates the device in action, along with measurements of its performance. This certainly provides a lot more functionality than an ATX power-supply conversion.

Update: A big thanks to [Debraj] who sent us a code package as well as the schematic (PDF) used during testing. We’re having trouble getting the code package up for download right now. Check back later, hopefully we’ll have it up soon.

Read the rest of this entry »




Atari 2600 recreated in an FPGA

posted Sep 15th 2010 10:04am by
filed under: classic hacks

Behold [Retromaster's] field programmable gate array implementation of an Atari 2600. The processor and video chip have both been built in the 100,000 gate Spartan-3E FPGA, with connectors for audio, video, and a Sega controller. The output signals are generated using two DACs made from R-2R resistor ladders, much like the project we saw in August. [Retromaster] included functionality for the system switches (difficulty and select) in the controller itself. There is VHDL code and board details available if you want to make one of your own. To help in making that decision we’ve embedded video of it after the break. Read the rest of this entry »

Building a discrete digital-analog-converter

posted Aug 17th 2010 12:38pm by
filed under: digital audio hacks

Want to take back control of how your digital audio files become sound? One thing you can do is to build your own digital to analog converter. This one is made from discrete components, centered around a resistive ladder. Yes, there are a couple of integrated circuits in there which are used for demultiplexing the incoming signal but the magic happens in that R-2R network. The project is an interesting read and makes a point of looking at the issues raised when trying to precision match resistors. Apparently it can be done with 0.1% components if you have a lot of them and a multimeter that can measure down to seven decimal places.

[Thanks Bigbob]

One-handed GameCube controller

posted Aug 12th 2010 6:09am by
filed under: peripherals hacks

[Hasse] built a one-handed video game controller for his brother. He fit everything he needed into the body of an existing controller and came up with a very usable system. The controller will be right-hand only, so the left shoulder button was moved underneath the right side where your middle finger can get at it. This leaves the d-pad and the left analog stick to account for. By combining an ATtiny44A, an accelerometer, and a digital to analog converter the controller can sense motion. The microcontroller reads in the accelerometer data, gives user feedback via four added LEDs on the d-pad, and the DAC feeds the appropriate signals back into the controller as if you were using the stick. There is even a switch to select whether the motion data is mapped to the analog stick or to the d-pad. We’ve included a demo video after the break.

Find that you also need some one-armed typing assistance? Check out this half-qwerty keyboard hack. Read the rest of this entry »




Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

Send us your hacks










     




Hacks

Resources