Hardware XOR For Output Pins On AVR Microcontrollers

Did you know that most AVR chips have a type of hardware exclusive OR (XOR) option when it comes to the logic levels of the output pins? If you look in the datasheet (the image above is a screenshot from an ATtiny13 datasheet) you’ll find a section on Toggling the Pin. It turns out that if you set a PORT as an output, writing logic one to the corresponding PIN register will toggle the logic levels of that out. This is really easy to overlook if you’re writing in C, but I’ve been working on learning a bit of assembler language and found this to be very useful. Keep reading after the break and I’ll tell you how I happened upon this info and what it’s good for.

Continue reading “Hardware XOR For Output Pins On AVR Microcontrollers” →

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” →

MB LED Is Next Generation Of LED Video Block Puzzles

Meet MBLed, a set of interactive 8×8 LED tiles. Put them next to each other and they will orient themselves into a video screen which is the sum of the parts. If this sounds familiar it’s because we’ve seen the concept before in the GLiP project. [Guillaume] tells us that MB Led is the new version of GLiP and from what we’ve seen they’ve made a lot of progress.

The hardware is well designed. A PCB hosts the STM32 microcontroller and a pair of pin headers which receive the RGB LED matrix module. A pair of AA battery holders make up the legs for the device. Each has infrared receiver/emitter pairs on each of the four edges and constantly polls for its neighbors.

What really impresses us is the algorithms they’re using for communications. FreeRTOS runs on the ARM processors, and a series of messages was developed which allow the blocks to elect a leader, and follow its commands via the distributed system. Check out more about those algorithms on the page linked above, and join us after the break to see the demo video.

Continue reading “MB LED Is Next Generation Of LED Video Block Puzzles” →

Your Snapshot On A Thermal Printed Receipt, Instantly!

What could be better than a low-res black and white photograph printed instantly on paper that will yellow and crumple over time? Wow, we really need to work on our sales pitch. But all kidding aside, we love the idea that [Niklas Roy] came up with in order to build this thermal printing camera.

His Picasa album has two snapshots of the hardware. He’s using an LM1881 for video sync separation just like he did with his PING project. From there an ATmega8 microcontroller grabs each column from the image and prints it using the thermal printer. It looks like everything runs on a 9V battery which is nice for portability (although we still never got our hands on that rechargeable 9V we’ve been meaning to pick up). Perhaps just as impressive is that [Niklas] got this up and running with about 400 lines of code. Nice!

Of course you’ll want to see this in action so we’ve placed a video clip after the break. Just like old-timey cameras it looks like you’re going to need to sit still until the image is done printing.

Continue reading “Your Snapshot On A Thermal Printed Receipt, Instantly!” →

Boobie Board Powered Twitter Notifier

boobie_board_twitter_notifier

The team over at Archonix frequently challenge themselves to create a full working project in under 20 minutes. [Andrew Armstrong] put together a blog post detailing their most recent “Quickproject” – a simple Twitter notifier built using their Boobie Board.

They started by putting together a small notifier breakout module that could later be attached to their Boobie Board. The module is pretty simple and includes a trio of LEDs to alert you to activity across several online services, though only the Twitter notification module is currently complete. The notifier’s code was written in LUA, and primarily designed to interact with Linux desktops. They do not currently have a Windows compatible version of the code available, but they are more than happy to host it if someone desires to port their code over.

The notifier was put into an old candy tin with a plastic window, which is perfect fit for their project. All in all, the entire thing took them about 40 minutes, with half spent on hardware, half on code. The notifier does just what it was intended to do, but they have a healthy list of improvements that they would like to add, including the use of the other two notifier LEDs.

External Text Display For Nexus One

Nexus One External Display

[follower] prototyped a 2-line external display for his Nexus One using an Arduino with a USB Host Shield, and the Android Open Accessory Protocol. There are two basic software pieces at work: an Arduino sketch that handles displaying data sent from the phone, and a lightweight android app to detect the presence of the external screen and send data to it. As shown here, it diplays the time and the beginning of the most recently received SMS message.

This project coalesced from several other things [follower] had been working on with regards to USB accessories, background services, interfacing with the Arduino and handling SMS messages, so it’s modular and open-source.  If you’re interested in mashing up microcontroller projects and your android phone, there’s plenty of stuff in this project to help you get off the ground.

As hacks go, this is very much a “because you can” sort of deal that’s designed to tie a bunch of cool things together. You’re unlikely to catch us carrying an LCD and breadboard around in our pockets any time soon, but it paves the way for some potentially fun phone accessories.

Handy Board Plays Music With An NES Controller

[Alex Busman] has been working with an old microcontroller board called the Handy Board. Recently, he figured out how to interface an NES controller to play music. With 8 buttons on an NES controller, [Alex] has control over an entire musical scale, so he demonstrates this in his video by covering the Dr. Mario Theme.

The Handy Board is a microcontroller board originally designed in 1995 for LEGO robots. With a 68HC11 μC running at 2MHz and 32KB of RAM, the Handy Board has been superseded by the LEGO Mindstorms NTX NXT, the Handy Board is thankfully still being supported, and is still a great platform to learn embedded design.

It’s great to see a build on relatively obsolete hardware, especially considering this would be a trivial build with an Arduino. We think it’s great [Alex] is learning the ins and outs of ‘difficult’ hardware – it’s a great way to learn something. Check out the walk though of [Alex]’s build after the break.

Continue reading “Handy Board Plays Music With An NES Controller” →