Programming an ATtiny using an Arduino

attiny

[Scott] is a big fan of the Arduino platform, and he’s not afraid to admit it. It does all the things he needs, but now and again he would like to use something a bit smaller, without all the bells and whistles the Arduino has to offer. He contemplated using an ATtiny for smaller projects, but after looking into what he would need to program the chip under Linux, he could never find the motivation to give it a go.

That all changed when he discovered the Arduino-Tiny project, which aims to bring a limited Arduino IDE to the ATtiny line of microcontrollers. He found the project to be quite useful, so he put together a brief tutorial that walks through everything you need to get started.

The tutorial is fairly straightforward, and even demonstrates how the Arduino can be used as an ISP for the ATtiny, removing the need to purchase a standalone programmer. Be sure to check it out if you are searching for an easy way to get started with ATtiny chips under Linux.

AVR HVSP on a tiny breadboard

AVR chips are convenient because you can program them in circuit at their operating voltage. That is, unless you screw up the fuse settings and they’ll no longer listen to an In System Programmer. If you find yourself facing this problem, just build this circuit on a breadboard and ‘unbrick’ by holding down the button.

The circuit seen above is a High Voltage Serial Programmer. This is one of two high voltage protocols used by AVR chips; HVSP is for chips that don’t have enough pins to use High Voltage Parallel Programming. This rendition uses a 12V power source, which is the level necessary for the high voltage method. A 7805 linear regulator joins the mix to provide operational voltage, along with one transistor, an ATtiny2313 to control the circuit, a four-digit 7-segment display for feedback, and one button for control.

Watch the video after the break to see an ATtiny13 programmed to disable the reset pin using a breadboarded programmer. That chip is then easily rescued, having been automatically recognized by using its device signature.

Continue reading “AVR HVSP on a tiny breadboard”

Versaloon can program hardware from several manufacturers

Versaloon is an open source, USB connected project, that centers around an STM32 processor and provides a standard JTAG pinout. Above you see the Nano version which has a 10-pin JTAG connector, but there is also a 20-pin option on the Handy model. Great, another JTAG programmer. Well this can do a bit more than that. With a bit of help from the software it has been turned into a programmer for ten different types of hardware. Obviously this should be able to program anything that works with the JTAG protocol, but the script adapts it to work as an In System (or In Circuit) Programmer too. So far the list of programming targets includes STM32, LPC1000, LPC900, STM8, AR8, MSP430, and a few others.

We had some trouble finding an actual picture of this hardware. If you’ve got one, snap a picture and leave a link to it in the comments along with your thoughts on the device.

[Thanks Geekabit]

Make your own minimalist AVR ISP

Giving a programmer is a great way to get people started in microcontrollers so If you want a cheap simple AVR programmer this might just be what you’re looking for. It combines the V-USB firmware, USBtiny software, a few resistors, and some zener diodes. An interesting trick using this programmer is if your trying to program another 8 pin ATtiny you can use some tape to isolate the USB data pins and then piggyback the target ATtiny on the programmer.

Unfortunately in order to flash the ATtiny for your programmer you need a working programmer so it’s somewhat of a catch-22.  Make sure your careful when setting the fuse bits because it will use the reset pin making it hard to reprogram without additional programming hardware. AVRs in general are a great way to start using microcontrollers so if your interested give out tutorials a go. You’ll find some tips to get started in addition to information about using an Arduino, or a DAPA cable to flash the firmware to this chip.

Launchpad not limited to value line chips

Wanting to use my TI Launchpad as more than just a development board I thought I’d do a few experiments using it as an in-system programmer. After a few tripping points I was able to get it working and then some. It seems that the device is not limited to just the value line of microcontrollers it was intended to support. In the image above I’m using it to program an MSP430F2272 which is a pretty powerful little chip with 32 KB of program space. Click through the break for more information on the setup.

Continue reading “Launchpad not limited to value line chips”

USB hub used for In System Programming

Did you order that 4-port USB hub because it was almost free but now it’s just sitting in your junk box? Why not turn it into an In System Programmer for AVR chips? [Paul] came up with HUB ISP as an answer to the chicken-or-egg problem we’ve seen with other diy programmers. It uses the data wires from four different USB cables to program AVR chips, enlisting the help of a 74HC00 NAND gate along the way. You do not need to have a programmed microcontroller as all the magic happens on the software end of things. The one caveat is that [Paul's] method currently only works on Linux machines.

Arduino programmer for Arduino

Wow, that title is flamebait… but give us a chance to explain. [George] wrote some code for the Arduino that allows it to program another Arduino. You may be thinking to yourself “this has already been done”. In a way it has, with the AVR ISP programming shield. But once the code has been uploaded to the Arduino, you don’t need a computer to program the next chip. This concept turns an Arduino into an in-the-field programmer. Right now his code only programs the ATmega328 and it’s a little buggy, but the concept is solid. A fully functioning independent programmer is easy to image; [George] has laid the ground work, the AVR ISP programming firmware has proven this can work with several different chips, and if your AVR has an ATmega328 there should be plenty of room to store the code you plan to flash to the target microprocessors. It’s up to you to put all the pieces together.