Creative Commons images are CC BY-NC-SA 3.0

2.84

added to your
shopping cart

quantity
In stock 457 in stock
2.84 1+ units
2.56 10+ units
2.27 100+ units

Description: Atmel's itty-bitty ATtiny85 8-Bit Processor. 8K of program space, 6 I/O lines, and 4-channel 10 bit ADC. Runs up to 20MHz with external crystal. Package can be programmed in circuit.

Documents: Atmel ATtiny85 Product Card

Comments 79 comments

  • Finally the 85 appears. SparkFun is in the U.S., so I’m guessing PIC fan boys. AVRs not on the brain. - I’d like to see an ATtiny parts kit including ATtiny85, 20MHz crystal, crystal caps, bypass cap, and maybe a six pin ISP header. Even if these parts aren’t kitted the related products list below should include them. Nope, now I gotta go hunting; or maybe that’s the idea :-(

    • Google Digispark.. currently on Kickstarter (until 9/9/12)

      ATtiny85 w/arduino bootloader, 500ma voltage reg, and usb plug, on a quarter sized board (0.69x0.75(17.5x19mm)-usb) I don’t see a crystal, so I assume they are using the internal clock. Some shields are also available.

      • They can’t use a crystal because they use the USB (both use pins 2 and 3).. So some of what i’d have used them for.. I can’t due to the lack of crystal capability. (believe me.. you realize just how out of spec the internal oscillator/pll are, when you’re trying to hit an exact output frequency, and it’s far enough out of spec that what you’re talking to, ignores you.

      • Those are neat. Hopefully SparkFun will carry them.

    • Like

  • nice little chip. im still not sure what to use it for. probably could use it as some kind of servo channel mixer, or anywhere where i need to convert one type of a signal into another. shortage of pins kinda limits the possibilities.
    i really wish sf would stock the tiny84 though, which has twice the usable pins, yet still being small enough for those tiny projects. sometimes i use a mega328 and consider it a waste of functionality and the 2313 has too little flash. but the tiny84 would be a perfect addition to the inventory. especially since i have had a hard time finding a supplier which would ship to ak at a sane rate.

    • You might have to bite the bullet and order 25 from Digi-Key to justify shipping. You will no doubt think of projects to build with them!

  • Any chance of you guys at Sparkfun selling this with the bootloader?

  • Does anyone know how much current you can source from the output pins? I couldn’t find it in the datasheet.

    • It’s in there. You’re looking for electrical characteristics, pg. 166:

      DC Current per I/O Pin ……………………………………….. 40.0 mA

      DC Current VCC and GND Pins………………………….. 200.0 mA

      So 40mA per pin, and 200mA maximum draw for the whole chip… note that you have 6 GPIOs, if you draw the 40mA from each pin, you’ll blow it… (6*40 = 240mA)

  • I just confirmed that the ArduinoISP can be used to program the SMD SMT version of the ATTiny85 chip. I used the Arduino 0022 IDE and board definitions and older version of the instructions from MIT High Low Tech. (The updated instructions for Arduino 1.0 fail for me.)

  • Since the MIT HLT lab site is no longer around, and all guides point to that, does anyone know where I can get the core files for this chip? I’m looking to use arduinoISP with this.

  • Can these be set to operate at 8 Mhz instead of 20?

    • Yep! The ATtiny85 ships with a fuse that makes them operate at internal 1MHz. That fuse can be changed to operate at 8MHz internal. If you need to go above that (or need better precision than the internal oscillator) you can set the fuses to operate with an external oscillator. 20MHz is the maximum external oscillator allowed.

  • I use these for any Arduino project that I am making that does not require more than 6 I/O pins.

    PROS: can be used with a breadboard can be programmed with the Arduino software only $2.84! (compared to the $30 Arduino Uno)

    CONS: only 6 I/O pins difficult to remove once it has been used in a circuit board…

  • I’m not sure why but, I can’t seem to find the output voltage per I/O pin, not including reset… can anyone help with this?

      1. Check out the datasheet
      2. Find the Electrical Characteristics pages. ( Chapter 21, page 161)
      3. Read through the table for the information you’re looking for :)

      In this case, with Vcc at 5V, the maximum low level is 0.6V, and the minimum high level is 4.3V.

  • Is this component available in India, Mumbai

  • So how many of these would I need to chain together to use as a Minecraft server…?

  • does anyone know how to set the reset pin as I/O when using an arduino as ISP? im a noob so i need step by step instructions lol

  • So does this actually have 6 I/O pins when you get it or do you have to reconfigure the reset pin or something?

    • You have to reconfigure the reset pin, so make sure you program it as desired in one go - or have a fuse bit restore circuit handy :)

      • Where can i get a High Voltage Programmer to restore the fuse?

        • I honestly wouldn’t know - I’ve never needed one :) If you need more I/O it might be worth it to go for the models that offer that without shenanigans.
          A quick googling about shows that you can get a dev kit from ATmel that’ll do HV programming (STK500), you can build your own (quite a few designs out there, mostly based on the dev kit), or you can eat the cost of the ATtiny and contribute to the landfills by tossing it and just programming another one (a popular option, apparently, but what a waste).

  • Hi all. Anyone know if it’s possible to use with a nordic radio? Is there any serial pirt on it?

  • Here’s a nice project with the previous version of this chip (AtTiny13) that shows how versatile and easty to work it is !

    It basically uses 3 different interrupts plus ADC (the attiny13 only has 1 ) and a simple digital output !

    Dan

  • I got this chip recently, and here is a short note on programming it with the Sparkfun AVR Pocket Programmer:

    http://tat-tvam-asi.in/hacking/programming-atmel-attiny85-with-the-sparkfun-pocket-programmer/

    • Site flagged as a Blackhat SEO Exploit by AVG. Do not click.

      • Looks like AVG is mostly tripping over a bunch of spam that’s in a normally-hidden DIV. While it raises questions of how that spam got there, I think it would be safe to click - especially with scripting etc. disabled, or right-click, save as, and open the file as text in e.g. notepad, as it’s mostly text instructions.

  • Link to product card not working - at least not in chrome…

  • I bet I’ll get slapped for this, but I’ll ask anyway. I am looking for suggestions on what power regulator I should use for this little guy when powering it from a 9v battery? I was thinking of using a Low Dropout Regulator 5 Volt 0.05A 3-Pin TO-92 Box from Jamco but I dont know if that little package will provide the correct output ourrent.

    (see: http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=107166&productId=107166&keyCode=WSF&CID=GOOG&gclid=CI2TocLm6rICFexAMgodOU0ALQ for the

  • I’m looking to build a rather complicated alarm clock for a friend’s birthday, and I figured I could use one of these to dramatically simplify the design, my only question is,

    How accurate is the internal resonator in these things? I’ve read that I can use an external crystal, and SparkFun sells them at +/- 50ppm stability, can I match that with the internal resonator?

  • I built a programmer for it, using the arduino proto shield. Makes my life a lot easier.

  • Does this have 3 PWM outputs?

  • This post says this can be clocked at up to 20 Mhz. Could I clock this at 16 to not screw up timing with my Arduino code?

    • Yes, you can run it at 16MHz. With avr-gcc and avr-libc (which Arduino is based on) clock speed is controlled by a preprocessor definition (F_CPU) - change it and your timing will be right.

  • Hi all! I’ve recently bought two of these Attiny85 chips. I followed the MIT hi-low tech-group instructions on using Arduino as an ISP to program the chips.

    http://hlt.media.mit.edu/?p=1229

    I uploaded the ISP example sketch first, worked fine. After trying to upload ‘blink’ thought I got these errors:

    avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64

    avrdude: failed to write flash memory, rc=-4

    avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

    I’ve triple checked my connections and poked around online for about three hours last night to no avail .. One common theory seems to be that the Attinys bootloader is fried/not the correct one. I’m stumped.

    Does anyone have any insight?

    • I had trouble with the Arduino IDE 1.0

      I reverted to the old Arduino 0022 instructions and board definitions and everything worked again. I think the new instructions are just incomplete or something.

  • Any chance of getting this to talk to another AT using i2c? My problem is my program is already very close to 8k so I’m thinking all the code to fake a UART or i2c may cause me to run out of space…

    • There is I2C on this chip… But it’s in the form of a “USI:” Universal Serial Interface. Check out the DS, but I think it’s sort of like a shift register to facilitate SPI and I2C communication. But you would still need to implement the protocol…

      check this out: http://code.google.com/p/arduino-tiny/wiki/TWIMasterLibrary

      (both master and slave libs avail.) not sure how much space it takes up, but it’s worth a shot…

      On the program side: if you have a lot of variables/strings/constants that you are working with, and you’re going to set up I2C, why not get an i2C EEPROM from SFE to store that? Could take down program size…

  • ‘Please, sir,’ replied Oliver, ‘I want some more [ATtiny85s].’

  • Do these have analog imputs? And if so, how many?

  • So, as I understand, one can program this, correct? What do I need to do that?

    • You’ll need a programmer like the this and some sort of AVR programming toolchain. Google programming avr or attiny and that should give you a start, but as of right now there’s no one best resource. There’s an incomplete tutorial on the adafruit website that is probably the best start, but you’ll have to do some searching on your own to fill in the blanks.

  • Link to Datasheet changed
    http://www.atmel.com/dyn/resources/prod_documents/doc2586.pdf

  • It has 2 pins for an external crystal, (up to 20Mhz) or you can use its 8Mhz internal one. Notice that this is not Arduino compatible out-of-the-box, you will need to get some files to make it work, but once you do that, its just very easy to setup. We have done a small project using one of those chips and it just works great. Check our GitHub files for the required files and how to setup the whole thing up.
    https://github.com/Beat707/Beat707-BigTime

  • What is the frequency of the internal oscillator?

    • You can set the CKSEL fuse bits to run at 16MHz from the internal oscillator. See page 27 of the datasheet.

    • i clocked mine to 8mhz on the internal oscillator. but you could run it up to 20mhz with an external crystal (at least thats what i read in the datasheet).

  • I see no dedicated pins for a crystal so does it require one? If it doesn’t require an external crystal do I have to do any configuring to get it to work? (I’m putting the arduino bootloader on it.)

    • You can use one but you lose one of the I/O pins. It can run up to 16Mhz without one so there’s no real advantage to an external crystal.

    • It can have a crystal. Look at the XTAL pins.

  • I’m goinna drag up the boot loader idea posted above :) im additiom to a few arduino boards, i also have the “teensy HID” which uses an atmel chip, and runs on the halfkay bootloader. very nice little program, easy to use, and the teensy can run everything the arduino can. might not hurt to offer the ‘85 with halfkay installed

  • Does this chip have UART?

    • No, but you can fake it by shifting bytes out with the USI peripheral and precise timing (driving the USI with a hardware timer is one option.) Note that you will have to flip the bits of the byte you wish to send or receive. This technique is tricky - see Atmel App Note AVR307 for details.
      If you want a cheap and simple AVR chip with UART, get the Tiny2313. It only has 2K of Flash, so keep your code simple. If that’s too limiting, go for the venerable Mega48 or ‘88, which cost the same or less than this chip. The Mega328 is pin-compatible with the '48 and '88 and SparkFun sells it.

      • The main reason people use ATtinys is because they are small, giving the example of the 48/88 doesn’t help those of use that use Attinys for their small size and ease of use.

        • The small size argument is kind of moot because a surface-mount (e.g. TQFP) ATMega328, which is entirely solderable by hobbyists, is a fraction of the size of even this 8-pin DIP chip. The main reason people (and by this I mean professionals) use ATtinys is because they’re cheap - a tiny25 is about 60 cents in bulk and can still do lots of powerful stuff!

      • Or the 4313. Same chip w/ twice the space.

  • Is this the ATtiny85 or ATtiny85v? The datasheet says the ATtiny85v will run at 1.8v but the ATtiny85 will only run at a minimum of 2.7v.

  • Can this processor output PWM? Can the arduino bootloader be put onto it? I really need a cheap alternative to the ATmega328 ad I hope this is it.

    • A cheap and excellent alternative to the 328 is a Mega48. It has 4KB of code space, 512 bytes of RAM and 256 bytes of EEPROM. It’s totally pin- and code-compatible with the old Arduino chip (the ‘168) and has all the peripheral features you need with none of the trade-offs that the Tinys make:
      * AVR Megas have hardware UART, I2C and SPI interfaces - Tinys have to emulate these with the USI (a specialized hardware shift register.)
      * Megas have a multiply instruction - Tinys have to emulate this in software too.
      SparkFun has no reason to stock a lesser version of the '328 but you can get them at prices approaching US$1.50 each at Digi-Key and other big suppliers.
      That said, the Tiny25/45/85 have a special feature that the Mega48-328 don’t, which is a programmable PLL that lets them run the PWM clock at a whopping 64MHz (undivided, check datasheet for specifics) and they can run the CPU clock from the PLL too, netting the ability to run at > 16MHz with no external oscillator!

    • Yeah, you can put the bootloader on it. See the link below. It is a slightly different version but you can still use the same commands.

    • Yeah it can output PWM, on multiple channels. (these or attiny45’s are what power the BlinkM RGB modules)
      I’m not sure if you can get the bootloader on them, but they have enough space for it.
      I broke down and got a USBtiny ISP programmer, but you can program with an Arduino board if you have one. Here’s some info I was looking into regarding that:
      http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585

      • Updated link: http://hlt.media.mit.edu/?p=1229 Updated link with for the Arduino 1.0.: http://hlt.media.mit.edu/?p=1695

        Great info here. I’m new to Arduino and was starting to realize that each Arduino project will require an Arduino ($$$). It’s nice to know that once I’ve got my project going I can dump it (i.e. shoehorn) onto something a much cheaper chip. Thanks all.

  • Im hoping to create an ATtiny programmer as well as use two of them for a key lock mechanism thingy. Just want to check the voltage operation from the datasheet. It will work at anything between 1.8V and 5.5V?
    I’m going to be running a larger battery on one for long time but watch batteries for the other.

    • yes, the ATTinys are quite flexible with power. For good (and safe) measure though, I would pair it with a suitable voltage regulator..

  • Just a heads up for those using this part, you’ll want to make your own component in Eagle. The ATTiny45 in the SFEagle library has the pin assignments mixed up (as of 09-15-2009).


Related Products