ATmega324 Acts As A GPU For Homebrew Computer

[Quinn Dunki’s] homebrew computer project is moving up another evolutionary rung. She needs a more versatile user interface and this starts with the data output. Up to this point a set of 7-segment digits has served as a way to display register values. But her current work is aimed at adding VGA output to the system.

She starts off her write up by justifying the protocol choice. Although composite video would be easier to get up and running (we see it in a lot of AVR projects) [Quinn] doesn’t have a screen that will display composite video. But there’s also a lot of info out there about VGA signal generation. She delved into the specifics and even found a great AVR-based example over at Lucid Science.

The version seen above uses the 40-pin ATmega324. It’s a lot bigger than necessary for the example she put together, but in the future she plans to add video memory and will be glad to have all of those extra I/O pins. When it comes to video sync, timing is everything. She wrote the code to drive the display using assembly. In this way, she was able to look up the cycles used for each command to ensure that the loop is running with near perfect timing.

Building Your Own Portable 3D Camera

diy-3d-camera

[Steven] needed to come up with a project for the Computer Vision course he was taking, so he decided to try building a portable 3D camera. His goal was to build a Kinect-like 3D scanner, though his solution is better suited for very detailed still scenes, while the Kinect performs shallow, less detailed scans of dynamic scenes.

The device uses a TI DLP Pico projector for displaying the structured light patterns, while a cheap VGA camera is tasked with taking snapshots of the scene he is capturing. The data is fed into a Beagleboard, where OpenCV is used to create point clouds of the objects he is scanning. That data is then handed off to Meshlab, where the point clouds can be combined and tweaked to create the final 3D image.

As [Steven] points out, the resultant images are pretty impressive considering his rig is completely portable and that it only uses an HVGA projector with a VGA camera. He says that someone using higher resolution equipment would certainly be able to generate fantastically detailed 3D images with ease.

Be sure to check out his page for more details on the project, as well as links to the code he uses to put these images together.

8-pin Micro Plays Pong On Your Widescreen

[Fernando] sent in a tangential project update that uses an ATtiny45 to play Pong on his television. Last time we looked in on his work he had just finished getting the eight-pin chip to display a big number on the TV via the VGA port. This expands on the idea while he continues to wait for parts.

Right now the chip plays against itself, but he’s got one input pin left and we’d love to see a button added for a simple one-player game. We’re thinking the paddle would always be moving in one direction or the other, with a click of the button to reverse that direction. The part that he’s waiting for is a Bluetooth module, which we’d love to see used for 2-player games via a pair of Wiimotes (we’re just wishing at this point and don’t know if that would even be possible). The end goal for the hardware is a Bluetooth connected scoreboard for Android devices.

The code is written in Assembly, and we found it relatively easy to follow what [Fernando] is doing with the game logic. On the graphics side of things he gets away with a 120×96 resolution because Pong is supposed to look pixelated. We love the result, which you can see for yourself after the break.

Continue reading “8-pin Micro Plays Pong On Your Widescreen”

A Masochistic Video Card

Have a penchant for pain? Why not destroy your fingertips with a wire-wrap tool building a video card made entirely out of discrete components.

When [Chris] decided to build an entry for the Dangerous Prototypes 7400 logic competition he already had his hands full. The 74xx chips he had on hand had a maximum clock frequency of 25MHz, but the VGA pixel clock runs at 40MHz. dividing the H sync timing by 4 means the maximum speed required of the video card is only 10MHz, albeit with a reduced resolution.

The video card was constructed on perfboard with wirewrap sockets. An 8-bit DAC was included, allowing the card to display 256 separate colors but only the three primary lines were wired up to the VGA cable. As is, the card cycles through 8 different colors in a constant loop, not bad for a pile of chips.

VGA out has been done on everything from an ARM to an ATtiny, but rarely, if ever, has VGA been done with discrete components. While this video card may not be our first choice for bitcoin mining, it’s still a very impressive build. Check out the walk through video after the break.

Continue reading “A Masochistic Video Card”

VGA Video Output With An ATtiny

vga_video_attiny

[Fernando] is working on creating a game at home, with live scoring displayed on a large LCD TV. He’s keeping mum as to what the game entails, but he was more than happy to spill the details on how he planned to use the television as a wireless scoreboard.

The writeup is the first part in what will likely be a substantial series of progress reports, covering how he used an ATtiny45 to drive his LCD display. Eventually, the scoreboard will use a Bluetooth adapter for wireless input, but his immediate goal was to get the display running properly.

He explains how he uses the tiny micro and its limited set of I/O pins to drive the display, dipping into some of the technical details along the way. He discusses how he worked out the timings of the VSYNC and HSYNC pulsing, as well as how how the characters are actually drawn on the screen.

The article isn’t overly heavy on the technical details, and he has sample code available so you can take a look at how the VGA magic was done, so be sure to check it out.

VGA Pong On A ChipKIT

[Nathan] got his hands on a chipKIT Uno32 development board and wrote a Pong sketch that you can play with a VGA monitor. We love the hardware that makes this feel very much like the classic. It uses a collection of resistor-based digital to analog converters to generate the color signals for the VGA protocol. The score for each player is show on a 7-segment display instead of being printed on-screen. And the paddles are made up of a pair of potentiometers.

You’ll remember that the chipKIT Uno32 is an Arudino compatible 32-bit development board. This project shows how the hardware handles, and how easy it can be to generate VGA signals with it if you know what you’re doing.

For those interested in the game physics themselves, [Nathan] provided a nice explanation about ball movement at the bottom of his post. If you need even more details, dive into the code package that he links to.

Playing Chess On A Microcontroller

[Arthur Benemann] started a little project for his electrical engineering program, and suffered the worst case of feature creep we’ve ever seen. He just posted an instructable of his picChess project that is able to play chess on a VGA monitor with a keyboard, with sound, a clock, temperature sensor. Apparently, [Arthur] was bored one evening and threw in an implementation of Conway’s game of life.

[Arthur] chose a DSPIC33F μC for his project with everything laid out on a bread board. He’s quite proud of his VGA routine, the first time he’s ever used DMA. We’re really impressed by [Arthur]’s chess engine – his is the first homebrew chess engine we’ve seen on Hack A Day. Although the engine is a brute-force search with Alpha-beta pruning, the engine itself seems fairly advanced that will even supports castling.

Although a few rules aren’t supported and the ELO rating of the engine isn’t known, [Arthur]’s engine should still be able to beat an amateur player. A fairly impressive feat indeed.

Check out [Arthur]’s video after the break.

Continue reading “Playing Chess On A Microcontroller”