It’s not that breadboarding AVR circuits is difficult. But you have to admit that it takes some time to set everything up. We don’t label the top of our DIP chips so that you know what each pin does just by looking. Which means that wiring up the programmer involves pulling out the datasheet. [Vinnie] found the solution to this problem which is to make one of these interface PCBs for each AVR chip family. The long pins make it easy to drop over the top of your microcontroller, which is where the name comes from.
His first stab at the idea was just a hunk of home etched PCB which broke out the programming pins into the 6-pin ICSP standard. This second rendition uses the 10-pin standard and adds a few extras into the mix. He included decoupling capacitors which need to be used in every circuit anyway. There’s a crystal along with its load capacitors. This clock source is a snap to enable by burning some fuses. If you choose to use the internal oscillator instead this hardware won’t interfere. The LED is used to get you up and running with blinky firmware as quickly as possible. He plans to add jumper in the next revision which can disconnect this components from the I/O pin. Now you just need to add a 10-pin header to that USB keyboard AVR programmer and you’re in business.
This project is reminiscent of the old days when window managers were an amazing new idea. The difference is that this window-based GUI is running on an ATmega1284 microcontroller. But the behavior and speed of the interface is pretty much exactly what you’d expect if working on an early 90’s home computer. It even uses a mouse as input.
So how is this even possible? The key to the project is a serial to VGA module which handles the heavy lifting involved with generating a VGA signal. We featured one of [Andrew’s] past projects which used an AVR chip to generate the VGA signal. But that doesn’t leave nearly enough cycles to implement something like a window manager, not to mention the fact that it got nowhere near the resolution shown here.
He uses a serial mouse with an RS-232 converter chip to interact with the windows. This is best shown in his video after the break. He’s able to generate and interact with new windows. He even implemented a set of rudimentary controls which allow him to adjust the theme of the windows and drive the audio playback feature included on that VGA controller he’s using.
Continue reading “GUI window manager on an AVR chip”
This simple circuitry makes up the hardware for [Andrew’s] AVR-based VGA generator. He managed to get an ATmega1284 to output a stable VGA signal. Anyone who’s looked into the VGA standard will know that this is quite an accomplishment. That’s because VGA is all about timing, and that presented him with a problem almost immediately.
The chip is meant to run at a top speed of 20 MHz. [Andrew] did manage to get code written that implemented the horizontal and vertical sync at this speed. But there weren’t enough clock cycles left to deal with frame buffering. His solution was to overclock the chip to 25 MHz. We assume he chose that because he had a crystal on hand, because we think it would have been easier to use a 25.174 MHz crystal which is one of the speeds listed in the specification.
Red, green, and blue each get their own two-bit range selected via a set of resistors for a total of 64 colors. As you can see in the video after the break, the 128×96 pixel video is up and running. [Andrew] plans to enlarge the scope of the project from here to make it more versatile than just showing standard images. The code (written in assembly) is available at his GitHub repository.
Continue reading “AVR VGA generator”
We’ve seen composite video out from AVR chips many times before. But we can’t remember coming across one that managed to produce a color signal. This project does just that, producing a color video signal from an ATmega168 without using external integrated circuits.
[CNLohr] is seen here showing off his accomplishment. You’ll remember him from the glass-slide PCB server project he’s been working on recently. This time around it’s a small piece of gaming hardware which he’s working on. But using four pins from the microcontroller, connected via resistors in parallel, he is able to generate a color NTSC signal without using a chip like the AD723.
After the break you can see the two minute demo in which he shows the game running for just an moment, then gives a general overview of how the signals are being built. There isn’t a ton of explanation, but he did post his code as well as a resource for you to teach yourself more about the NTSC standard. Maybe you can make a color version of that AVR tetris game?
Continue reading “Color NTSC video directly from an AVR chip”
This project started as a simple microcontroller replacement on this IR camera remote control PCB. But the soldering job went rather badly for [Balthamos] so he changed things up and designed his own simple AVR remote shutter release and intervalometer.
The DIP chip seen with most of its legs bent backwards is the ATtiny25 which makes the system work. It’s patched into the traces for the battery connections, button (on the other side of the board) and the IR LED he’s pinching with his left hand. Point it at a Cannon camera and push the button to snap a photo. But as you can see in the clip after the break it also serves as an intervalometer; letting him take several pictures with a user-defined pause between each. That mode is selected by first pressing and holding the button. Once released the chip waits for a second button press to register the delay. The new circuit still fits in the original case after just a bit of alteration to it.
Continue reading “ShuttAVR can snap a pic or serve as an intervalometer”
Ah, PIC vs. AVR, the never-ending battle of electronic design supremacy. Some people swear by Atmel’s AVR microcontrollers, while others are wrong. [majenko] is firmly planted in Microchip’s PIC camp, so he wrote up a nice comparison of Atmel’s AVR versus Microchip’s PIC family of microcontrollers. The results aren’t that surprising; PIC microcontrollers come out as a better product that no hobbyist uses because no hobbyist uses them.
Atmel and their series of AVR microcontrollers has seen a huge increase in popularity in the hobbyist market in the last few years, no doubt thanks to the Arduino and other AVR-powered dev boards. This isn’t to say Microchip and PIC haven’t seen their time in the lime light; there was a time when you could actually buy electronic components at Radio Shack, including kits containing Microchip’s very popular but somewhat outdated Basic Stamp.
After going over the capabilities of the Atmel AVR ATMega328p, the similarly equipped Microchip’s PIC PIC18F25K80, and TI’s MSP430G2533, [majenko] found the perennial favorite, the AVR, lacked in some very important categories. The AVR has a lower resolution ADC, fewer PWM pins, fewer 16-bit timers, while costing about $0.75 more.
Of course [majenko]’s analysis doesn’t take into account the intangibles of choosing a PIC over an AVR. Thanks to the Arduino’s adoption of the AVR, there are many, many more code and schematic examples floating around on the Internet for just about every project imaginable. The development tools for PIC are a bit more expensive than their AVR equivalents; A PICkit2 runs about $50 while AVR ISP programmers can be found just about everywhere for pocket change.
It’s a lazy Sunday, so all ‘yall can go on and argue in the comments.
We won’t call it useless, but we will ask why [Dan] wrote a brainfuck interpreter for the AVR
It’s not generating code for the AVR; think of it more as a bootloader. To run a brainfuck program, [Dan] uploads it to the EEPROM inside his ATMega32, after which the microcontroller takes over and starts performing whatever instruction the brainfuck program tells it to do. Because the whole thing runs off the EEPROM, the code size is limited to 1022 bytes. Enough for any brainfuck program written by a human, we think.
As for why [Dan] would want an AVR to build an interpreter for a language that is nearly unreadable by humans, we honestly have no idea other than the common, ‘because it’s there’ sentiment. There are some pretty cool projects out there that use brainfuck, including this genetic algorithm software developer. Right now, though, blinkey LEDs are enough to keep us happy, so you can see a video of brainfuck doing its thing on a LED bar display after the break.
Continue reading “Interpreting Brainf*#k on an AVR”