Standalone proects

DuaneB:
I haven't used any ATTiny chips before, if I wanted to start using them as Arduino's which is the most widely supported of the ATTiny series ?

ATtiny85 (and family), ATtiny84 (and family), ATtiny2313 (and family) are well supported. There is a core available for the ATtiny13 but I do not know how complete it is (@smeezekitty does know).

Hi,
Sorry for a dumb question, but having a look on the Atmel site, there are dozens of Attiny chips, what are or where can I find the major difference between the Families 84,85 and 2313 ?

Thanks

Duane B

rcarduino.blogspot.com

DuaneB:
Hi,
Sorry for a dumb question, but having a look on the Atmel site, there are dozens of Attiny chips, what are or where can I find the major difference between the Families 84,85 and 2313 ?
rcarduino.blogspot.com

Hi Duane,

I've printed and laminated this http://www.akafugu.jp/images/microcontroller-reference-sheet-A4.png reference sheet - comes in very handy. As you can see while there are stacks of variants, they are grouped into families with similar pin-outs, and after that you hit the data sheet to see where they differ within a family (typically in capacity of RAM, FLASH, and EEPROM, as well as the clock frequencies they're capable of, and in some cases the voltages they operate at.

So the ATtiny85 is has the greatest RAM of the 8-leg ATtiny family, for example.

Cheers ! Geoff

For small project I think the cheapest solution is the Attiny85.
I have made a little stripboard version seen in the picture, and as Nick says you can program it from the Arduino IDE, in fact you wont feel any difference if it is a ARduino or a attiny sitting in the other end (besides the pincount and pinnumbers)

You can program it using Arduino as Nick demonstrates, although I prefer a cheap programmer like this, that plugs into the ISP header on the stripboard

If you need more pins than the attiny85 provide you could go with the Attiny2313, although it dosn't have any ADC so you can't use analogRead()

A little off-topic, but this is the cheapest Arduino I have seen:

So if I were to buy the Attiny85, what else would I need to buy to program it with my Arduino? Does the chip include the pinout diagram?

DuaneB:
Sorry for a dumb question, but having a look on the Atmel site, there are dozens of Attiny chips,

It is not a dumb question. Other than very basic information (e.g. Flash and SRAM) size, Atmel's website is woefully lacking in marketing information (e.g. "what cool things does this processor have that the others do not").

what are or where can I find the major difference between the Families 84,85 and 2313 ?

Timer 0 is identical across all the processors.

85

It has enough memory to support complicated / multipurpose applications (8K Flash, 512 SRAM). It has two siblings (45 and 25) that are identical except memory sizes. You would use a smaller sibling if cost is a concern and you know your application will fit.

The 85 processor is an 8 pin chip: 5 I/O pins, RESET, power and ground.

The analog-to-digital converter is very similar to the one on the 328 processor. The ADC has a few more features: 2.56V reference, differential inputs.

The 85 processor can be easily configured to run at 1 MHz, 8 MHz, and 16 MHz with no external components. It can be driven from an external crystal or resonator.

Timer 1 is a PWM beast: optional 64 MHz base frequency, plethora of prescalers, inverted outputs, dead-time generator.

For SPI and I2C communcations the processor has a "USI – Universal Serial Interface". The USI is a very simplified version of the hardware available on a 328.

84

It has enough memory to support complicated / multipurpose applications (8K Flash, 512 SRAM). It has two siblings (44 and 24) that are identical except memory sizes. You would use a smaller sibling if cost is a concern and you know your application will fit.

The 84 processor is a 14 pin chip: 11 I/O pins, RESET, power and ground.

The analog-to-digital converter is very similar to the one on the 328 processor. The ADC has more features: differential inputs, selectable 20x gain.

The 84 processor can be easily configured to run at 1 MHz and 8 MHz with no external components. It can be driven from an external crystal or resonator.

Timer 1 is essentially identical to timer 1 on the 328.

For SPI and I2C communcations the processor has a "USI – Universal Serial Interface". The USI a very simplified version of the hardware available on a 328.

2313

It has very little memory (2K Flash, 128 SRAM). The 2313 has a bigger brother (4313) that is identical except memory size (4K, 256).

The 2313 processor is a 20 pin chip: 17 I/O pins, RESET, power and ground.

It has a USART similar to the one on the 328 (including Multi-processor Communication mode).

An analog-to-digital converter does not exist.

The 2313 processor can be easily configured to run at 1 MHz and 8 MHz with no external components. It can be driven from an external crystal or resonator.

Timer 1 is essentially identical to timer 1 on the 328.

For SPI and I2C communcations the processor has a "USI – Universal Serial Interface". The USI is a very simplified version of the hardware available on a 328.

FallenDemon:
So if I were to buy the Attiny85, what else would I need to buy to program it with my Arduino?

A working version of the ArduinoISP sketch, capacitor or resistor to disable auto-reset, wire, breadboard, and a core.

There is a core available here...
http://hlt.media.mit.edu/?p=1695

And a better one ( :D) available here...
http://code.google.com/p/arduino-tiny/

Does the chip include the pinout diagram?

I don't think anyone ships the processor with a diagram.

Huh. I didn't know about the 16 MHz. Well you learn something new every day.

FallenDemon:
So if I were to buy the Attiny85, what else would I need to buy to program it with my Arduino? Does the chip include the pinout diagram?

If you have another board like a Uno you can use that to program it. As Coding Badly said you can use the ArduinoISP sketch. I also show here how you can simply dump a hex file onto an SD card and program it from that:

Thanks a lot guys. I will be ordering a bunch of Attiny85's and using the Arduino Uno as the programmer. :smiley:

FallenDemon:
Thanks a lot guys. I will be ordering a bunch of Attiny85's and using the Arduino Uno as the programmer. :smiley:

Make sure to keep an ATmega328P or two in the parts draw to cater for project scope creep too :smiley:

Okay so turns out my local electronics store had some Attiny85 chips. Does the Arduino 1.0 software not support the core attiny45_85 files? I get an error while even compiling the Blink skecth while using Attiny85 w/Arduino as ISP. So it has nothing to do with the wiring or hardware side. I get the error, "OUTPUT not declared in this scope."

FallenDemon:
Okay so turns out my local electronics store had some Attiny85 chips. Does the Arduino 1.0 software not support the core attiny45_85 files? I get an error while even compiling the Blink skecth while using Attiny85 w/Arduino as ISP. So it has nothing to do with the wiring or hardware side. I get the error, "OUTPUT not declared in this scope."

Not out of the box, no. You'll need to add some functionality - check http://hlt.media.mit.edu/?p=1695 for instructions on what to do and what to download. If you decide to use someone else's ATtiny core software the instructions are still the same.

Okay I found the core for 1.0. However when I go to Tools>Board which one do I choose? The exact chip came from here...http://www.newark.com/jsp/search/productdetail.jsp?SKU=68T3808&CMP=AFC-GB100000001

However the core includes choices for external and internal clocks.

If you're not using an external crystal in your circuit, it's internal. Select the 1MHz one if you're using the chip out of the box, as it were, or the 8MHz one if you've followed the instructions to set the chip to 8.

Cheers ! Geoff

I would assume to set it to 8? What is the difference?

Hi, Read the instructions in the link I posted above. It shows how to change it to 8 from the factory default of 1. It's for SoftwareSerial compatibility in the main but it's all explained there. Cheers ! Geoff

Thank you.

I've just ordered a pile of Attiny85's (they're really cheap!) to make permanent versions of a few of my arduino projects,
but while I'm waiting:

what are the main limitations of an Attiny85 over a Arduino Uno ?

  • lower memory and less I/O ports
  • port numbers differently

but will all the same code generally work with a recompile ?

e.g the easy servo drivers, i2c stuff for wii acceleromters etc ?

AIUI I'll have to configure them to 8Mhz, use arduino as an ISP, and download a few files for the IDE, but am I missing anything else ?

Sounds like you want a lot of pins you won't have. Make sure you don't want many analog or PWM pins, and be mindful if you play with spi you lose the USI pins in one go. I found the RAM was a big limitation for using one with an infrared controller...amazing how fast you can chew it up.

Remember one of the legs is also the reset so it has limitations too. And of course there's no serial monitor for debug messages.

On the flip side I found using one with a pair of shift registers was a breeze for adding 16 digital outputs...but by the time you do that you could have bought an ATMega328 for the price and had more RAM...

And I've not strictly answered your question. Compared with a UNO you lose power regulation, USB, shields, the ability to have SPI & I2C at the same time, the onboard status LEDs...but I'm pretty sure you were asking to contrast the 2 processors when used standalone...

You will have fun, though in my short time playing with them I find I think of a project that suits ATTiny and code for it from the start rather than migrating a working Arduino project to the smaller chippies.

Cheers!
Geoff

Hi,

At the one supplier I checked with, the 328 chip was only double the price of the 85, so I ended up sticking with the 328, bought 10. I also have some standalone projects based on ATMega8's as they were all that I could find in Dubai. I imagine that these may be available elsewhere as old stock at a lower cost, possibly less than attiny's ? Anyone seen this anywhere ?

Duane B

rcarduino.blogspot.com