avr development « adafruit industries blog

AVR programming trick: Sharing target boards

 4083 4947573029 1E2B464E39 Z

AVR programming trick: Sharing target boards @ Evil Mad Scientist Laboratories

This week, Brad wrote in with an interesting question: Can you program the ATtiny25 on one of our ‘tiny2313 target boards? And the answer is yes: you can, with just a trivial modification.

Okay, back up– a little context here. The ATtiny25 and the ATtiny2313 are examples of AVR microcontrollers, the little brains that power many of our projects.

To program these chips, we use a usbtinyisp programmer, hooked up to a minimalist target board



Stuff for the AVR freak…

 Wikipedia Commons A A9 Atmega8 01 Pengo

Some good stuff for the AVR freaks up in here, Alastair writes in…

Here’s a replacement for WinAVR with up-to-date tools (since WinAVR has been abandoned, and nothing has yet been released from Atmel) & an efficiency oriented runtime library for AVR microcontrollers, for those ready to graduate from the Arduino environment.



Developing Software for the Atmel AVR with AVR-Eclipse, AVR-GCC & AVRDude

Screenshot 29

Developing Software for the Atmel AVR with AVR-Eclipse, AVR-GCC & AVRDude from Interactive Matter -

Developing software – or better firmware – for the Atmel AVR can be quite easy or quite complicated. A lot of people like to just use vi, some source files and a make file. Here at Interactive Matter we are a tad lazy and want a fully fledged IDE, with code completion, one click building, no make files and buttons to flash the AVR. The easiest was is to achieve this with Open Source Software, using avr-gcc, avrdude and avr-eclipse. This guide explains how to install and use it.



HOW TO – Make a low level magstripe reader (with a Teensy or Arduino) Swipe swipe…data!

Ribbon T

Teensy T

4799394816 88Aa8B952F

Full tutorial here.

TL;DR – In order to get raw parsed data out of a magstripe reader, we first experimented with a MAGTEK Centurion Keyboard Encoder (PN-21073062). We found that although we could get all 3 tracks of data, it was not possible to have it parsed out. We then purchased a raw magstripe decoder head with track 1 reading, the Omron V3A-6. By writing some parity checking code, we were able to read the raw data off of the magstripe, and parse it into output that would be ‘typed out’ as an emulated keyboard using a USB-enabled Teensy. An Arduino can also be used, and the data would be output as Serial which may also be useful.

Source code and some handy datasheets are on GitHub. Click Download Source to get the latest version.

We also suggest checking out StripeSnoop which despite being a couple years old, was extremely useful!

This project can only be used for card reading, not writing. There is no way to convert a card reader into a card writer.

So there I was, 5 days before HOPE (Hackers on Planet Earth) conference – getting ready for our booth that would be running all weekend. We had a similar booth at the previous HOPE, and it was pretty successful, one of the only things that hung us up was that we couldn’t easily accept credit cards and the ATM had run out of money. We could take credit cards but it took a long time and was typo-ridden because everything had to be entered into a website. See, instead of a boxy terminal, we were using a Virtual Terminal – a website that allows you to enter in all the important data (card number, expiration, name, amount, etc).

Click here to read more!



AVR Night Light

An ATTiny2313 powers this night light, driving multicolor LEDs diffused by ping-pong balls. nuumio writes:

Geir’s RGB night light was such an inspiration I just had to make my own.  Instead of Picaxes I decided to use ATTiny 2313. At first I tried to program it with C but I ran to some “differences of opinions” with gcc when I tried to assign dedicated registers to variables holding duty cycle values (for speed optimizations). After some struggling  I gave up and coded the whole thing in AVR assembly. I was quite surprised how easy it was after all. It took me about one weekend and I got first versions running nicely.

Great job, nuumio!



Homemade (AVR) speedometer

Pt 10106

Homemade (AVR) speedometer via HaD. Howie writes –

My speedo cable snapped. Boo. The speedo was never very accurate anyway, so rather than replace the cable I figured it’d be fun to try making a digital speedo – plus it’s an opportunity to try using surface mount components rather than the bigger through-hole ones I’ve used so far. A bit of an ambitious design this time round – separate display and control boards, bigger and more complicated than anything I’ve done to date



Using USBTiny version 2 in Vista – driver signing

Pt 2572
If you’re using USBTiny version 2 in Vista and having problems, try this driver signing tip from forum member grantejust keep in mind that it might be weird/risky… the hack that is, IT SEEMS A LITTLE SKETCHY – THIS IS A WARNING

Use this tool to sign the drivers with a test key and force windows to always boot in test mode. Works for me.

You can also try this – “Disable Driver Signing in Windows 7 Using Group Policy Editor“… we’ll try some/all of these out soon, for now – report back if you have anything to add!



V-USB – A Firmware-Only USB Driver for Atmel AVR Microcontrollers

 Images Vusb Vusb-Teaser
V-USB – A Firmware-Only USB Driver for Atmel AVR Microcontrollers

V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.

Thanks Travis!



From the mail bag…

 Adablog Wp-Content Uploads 2009 11 Letterswegetletters-1

Brian from Ohio writes in…

My goodness. Thank you *so* much for making the USBTiny ISP kit!… Thank you for sharing the fruits of your talents and work with those of us at home trying to learn how these things work. Without people like you and Windell & Lenore over at EMSL, I would never have started down this path. I’m having a great time, and my 9yo son is as well. He’s thoroughly intrigued by electronics and programming, and the tools you offer are an enormous help for us!



simavr – AVR simulator

simavr – AVR simulator via littlebird.

simavr is a new AVR simulator for linux, or any platform that uses avr-gcc. It uses avr-gcc own register definition to simplify creating new targets for supported AVR devices. The core was made to be small and compact, and hackable so allow quick prototyping of an AVR project. The AVR core works more or less perfectly now. The simulator loads ELF files directly, and there is even a way to specify simulation parameters directly in the emulated code using an .elf section.



HOW TO – Getting AVR tools working on Mac OS X (Snow Leopard)

Pt 2329
Reg shows you how to get AVR tools working on Mac OS X (Snow Leopard)! He writes -

Building the AVR toolchain by hand also thwarted me somewhere in the building of the avr-binutils package — it doesn’t want to build on my Mac.  As soon as I entered the dependency hell of installing an upgraded gcc to build binutils and that didn’t work either, I got pretty fed up with that line of attack. Finally, I tried installing the AVR toolchain from the Fink project. Success! Here are the steps it took to get it up and running…

You can also use the Arduino as an “In System Programmer using the AVR Mega8“…



HOW TO – Programming ATtiny13 with USBtinyISP

 Wp-Content Uploads 2009 11 Usbtinyisp Set Up
Lars shows you how to program an ATtiny13 with the Adafruit USBtinyISP-

To program the ATtiny13 or other AVR tiny microcontrollers I use the USBtinyISP. It is a diy build programmer, you can buy a package and you only need to solder. The nice thing is that it works with USB and can power the circuit directly. More information about the programmer can be found here: http://www.ladyada.net/make/usbtinyisp/ I use Windows Vista for programming. USBtinyISP uses an USB driver to work under Windows. This works good on 32 bit Vista system, but on 64 bit system you need to disable Windows check of unsigned drivers. This can be done by pressing F8 during boot and selecting a boot option at the bottom. This needs to be done every time you want to program the microcontroller. Perhaps a reader knows a solution to that? Please post in the comments. The USBtinyISP is cheap and works great…



Chameleon AVR 8-Bit system

 Products Chamavr Cham Avr Pcb Top 04 Main
 Products Chamavr Cham Avr Pcb Top Annotated 01 Lrg
The Chameleon uses an Atmel AVR ATMega 328P as the main master processor (client) and Parallax multicore Propeller chip, includes the Arduino bootloader too -

The Chameleon(TM) AVR 8-Bit is the evolution of the high performance, small footprint, application development board. Similar to the BASIC Stamp(TM) and Arduino(TM) in concept, the Chameleon takes these products to the next level with a huge leap in computational performance as well as I/O interfaces. Simply put, the Chameleon is a credit card sized computer with (2) processors, (9) processing cores, 1 MByte of on board FLASH, 64K of EEPROM, and over 170 MIPS of processing power! If that wasn’t enough, the numerous I/O interfaces include composite video for NTSC/PAL generation, VGA, audio out, PS/2 for keyboards and mice. Additionally, the Chameleon has a number of digital I/Os and Analog inputs making the Chameleon perfect for industrial controllers, experimentation, education, wearable computing, or hobbyist use.



Using an AVR as an RFID tag

Avr-Rfid-Card
Sketchy :) Micah writes -

Experiments in RFID, continued… Last time, I posted an ultra-simple “from scratch” RFID reader, which uses no application-specific components: just a Propeller microcontroller and a few passive components. This time, I tried the opposite: building an RFID tag using no application-specific parts. Well, my solution is full of dirty tricks, but the results aren’t half bad. I used an Atmel AVR microcontroller (the ATtiny85) and a coil. That’s it. You can optionally add a couple of capacitors to improve performance with some types of coils, but with this method it’s possible to build a working RFID tag just by soldering a small inductor to an AVR chip



Optimisations of AVR programs using avr-gcc

Pt 2121
Very useful – how to optimize code for AVRs



Older Posts »
www.flickr.com
adafruit's items Go to adafruit's photostream
www.flickr.com
items in Adafruits More in Adafruits pool