The ATtiny85 device is well... physically tiny!
Yes, it has less Flash and Less SRAM but it fits into an 8 pin
package. For physically small projects this is a big deal but the
question is:
In fact, you can do a lot with the Flash memory size, and unless you
are writing something really complicated (or with a lot of strings
message data) then 8k/6kBytes is still very useful.
You might think that it is far inferior to the Arduino Uno with the
ATmega328P having only 8 pins (and you can use only 6 as one
is VCC and one is GND)! but it has a very respectable set of internal
peripherals and it even has a few items that are not available in a the
ATmega328P (Arduino Uno/Nano):
You can mess around with just the basic 8-pin chip on a breadboard (to get full 8k Flash access) but then you
need to setup an ISP programmer - there is an easier way!
That is to use a DigiSpark breakout board with a pre
programmed ATtiny85 programmed with a bootloader i.e. just the same as a
"normal" Arduino Uno. The bootloader allows USB communication without USB hardware!
The top 8-pin chip is the ATtiny85. The board includes a 5V regulator (middle 7805) two LEDs - green/white SMD - (bottom left [PWR] & left of pin P2 [MISO,PB1]) and a USB micro connector (left side) as well as breakout connector pins.
The disadvantage of using the Digispark is that the Flash space is
reduced to 6kBytes because of the USB software. This sounds bad but is quite a useful amount of
memory. The advantage is that you
can use the Arduino IDE in nearly the same way as programming an Uno.
It
is just more convenient than programming the raw chip using an ISP
programmer - however if you run out of memory then you will need to do
that!
Although it has less memory than an Arduino Uno, you might want to use
this board because its small size: 24.3mm x
18.4mm. Compare this to an Arduino Uno 53mm x 70mm (75mm with USB
connector sticking out).
An alternative is the Arduino Nano that has
about the same width but twice the length. The Nano uses the ATmega328P - the same microcontroller as the Arduino Uno.
Here are more useful comparison pictures.
So, if you need to reduce space, you can see the advantage!
Note: You can find Digispark IDE setup instructions here.
View larger image here.
Arduino Pin 0 (PB0) : I2C SDA, PWM
Arduino Pin 1 (PB1) : PWM, (LED)
Arduino
Pin 2 (PB2) : Analog Input, I2C SCK, INT0
Arduino
Pin 3 (PB3) : Analog Input, (USB-)[this is correct buzzed out]
Arduino
Pin 4 (PB4) : Analog Input, (USB+)[this is correct buzzed out], PWM
Arduino
Pin 5 (PB5) : Analog Input, RESETn
All of the above pins can be configured as digital I/O as well.
Originally the LED was connected to PB0 which stopped I2C being
used. The recommendation was to cut the track to the LED (to PB0). You
are likely to have a newer version with LED connected to PB1.
Comments
Have your say about what you just read! Leave me a comment in the box below.
Don’t see the comments box? Log in to your Facebook account, give Facebook consent, then return to this page and refresh it.