background preloader

Attiny85 with arduino

Facebook Twitter

AVR ATtiny USB Tutorial Part 1. I wanted to build an USB device using AVR microcontrollers since I found out that it was possible.

AVR ATtiny USB Tutorial Part 1

However, both the USBtiny project and the more extensive V-USB library lacked an easy-to-approach tutorial. So I decided to make one. This first part covers the basics for making USB-powered devices, and serves as introduction for second part, which goes through simple example for using V-USB library to implement USB communication to and from ATtiny2313. Additional parts might be published later if I have the time and there’s interest. But let’s get started. USB cable and pin headerSmall breadboard and a few jump wiresLED and 330 ohm resistorLow voltage drop 3.3V regulator, such as LD1086V33 or LE33CZ The cable The first thing we need to do is cut the USB cable so the end that goes into computer remains, strip the other end and solder the four wires into a pin header so it’s easy to plug the cable into a breadboard.

Here you see the end result. Simple breadboard test Congratulations! AVR Tutorial - How programming works. So you have this chip, and its programmable.

AVR Tutorial - How programming works

But how do you get your program onto that chip? Comments? Suggestions? Post to the forum! When code is compiled into a windows program, its turned into "binary" which means its not human-readable (which is tough for machines to understand), instead it is machine-readable. For microcontrollers, binary files end in .hex (short for Intel Hex Format) There are other formats possible, but this is pretty much standard. Your compiler will generate a .hex file from code, and then all you have to do is transfer that .hex program to the chip! As discussed in What is it? A good way to think about flash is to examine it as you probably are familiar with it. Back of Multi Media Card. If you look up in the MMC card specification, you'll find out that these are what the 7 pins are for. The power and ground pins are used to connect power to the chip. OK, so what does this have to do with a programmer?

Quick Quiz : How much EEPROM does the chip have? Arduino-tiny - ATtiny core for Arduino. Arduino-Tiny is an open source set of ATtiny "cores" for the Arduino platform.

arduino-tiny - ATtiny core for Arduino

The Arduino platform currently supports Atmel ATmega processors. There is a need for the Arduino platform to work with physically smaller DIP package processors. The intent of this project is fulfill that need. Specifically, our goal is to provide a core that enables Arduino users to work with the ATtiny84 (84/44/24), ATtiny85 (85/45/25), and ATtiny2313 (4313) processors. Download the latest version for Arduino 1.0 Download the latest version for Arduino 1.5 Arduino libraries available for ATtiny processors...

I2C / TWI Master library for the ATtiny85 Alternatives to this core (as of 2010-Nov-16)... bohne (René Bohne) published '2313 and '84 cores... SuperCow (R.Wiersma) published an '84 core... saposoft (Alessandro Saporetti) published a '45 core... The MIT High-Low Tech group published a '45 / '85 core... I believe macsimski has published an '85 core but I can't find a link. (Thank you to everyone above!) Programming an ATtiny w/ Arduino 1.0.1. This tutorial shows you how to program an ATtiny45, ATtiny85, ATtiny44 or ATtiny84 microcontroller using the Arduino software. These are small, cheap ($2-3) microcontrollers that are convenient for running simple programs.

The ATtiny45 and ATtiny85 have eight legs and are almost identical, except that the ATtiny85 has twice the memory of the ATtiny45 and can therefore hold more complex programs. The ATtiny44 and ATtiny84 have 14-legs and more inputs and outputs. Thanks to Mark Sproul for his work on making the Arduino core portable across processors. Materials and Tools For this tutorial, you’ll need: An in-system programmer (ISP), a piece of hardware used to load programs onto the ATtiny. For more information, see our list of materials and parts and our list of prototyping supplies . Download Installing ATtiny support in Arduino.