46
votes
Accepted
ATtiny85: Power consumption vs clock speed
The datasheet shows that current decreases at lower frequencies. Around 1 mA at 1 MHz running at 5 V. More like 5 mA at 8 MHz running at 5 V.
You can save quite a bit by using lower voltages as well, ...
16
votes
Accepted
_delay_ms() is much slower than expected (by a factor of 6) on TinyAVR 0/1 (ATTiny1604)
Your toolchain is not broken. In the ATTiny804/1604 datasheet, page 77, it shows the CPU clock is divided from the 20/16 MHz oscillator by a prescaler (the ATTiny1614 datasheet shows the same clock ...
12
votes
Accepted
When using Arduino Uno as ISP does "Yikes! Invalid device signature" mean a bad connection, bad config, or bad version of avrdude?
I soldered wires to pads to be sure the connection was good, and used those wires for programming from the Uno. Then the programmer worked, without any edits to the command lines as posted in the ...
12
votes
Optimizing code for ATtiny10
As I stated in a comment, this device would be too small for me to
consider programming it using an Arduino core. I would rather stick with
the avr-libc and direct port manipulation:
#include <...
9
votes
Accepted
ATtiny85 minimum setup to blink led
This schematic shows a complete connection of a blinking led.
Red cable = +5V (pin 8)
White cable = Ground (pin 4)
Resistor = 1 end at pin 5 (IO 0) and the other in the LED anode (+)
Led anode (+) in ...
9
votes
Accepted
Can you access the EEPROM of an ATtiny with Arduino Code?
The Arduino EEPROM library is compatible with the ATTiny range of AVR microcontrollers as the library itself is built on the standard Atmel AVR avr/eeprom.h 'library' so it is compatible with all the ...
9
votes
What is using up all the RAM in my program?
There is a lot you are missing. Such as:
SoftwareSerial is using RAM.
The system stack is using RAM.
The Arduino core software is using RAM.
There's plenty more going on than just your sketch. For ...
8
votes
Accepted
How to program ATTiny85 running 3.3V
Since the ATTiny can easily run at 5V I don't see any problem with programming it at 5V levels and then run it at 3.3V. Is that correct?
Yes. But if there are any components on the board that can't ...
8
votes
ATtiny85 communication with computer through USB
Digispark made a lot of these as part of a "cheap Arduino USB interface" project a while back.
This is my Digispark, it's pretty cute:
They have a web page here.
I got them for about $2 each. The ...
8
votes
Accepted
Why can't the Atmel ATtiny family delay over a minute?
This is absolutely nothing to do with "why can't the atmel attiny family delay over a minute?". It is all to do with the way that C++ works.
See my page about Integer arithmetic and overflow.
To ...
7
votes
Accepted
Is programming the ATTiny85 possible in 1.5?
You can download a version of arduino-tiny for IDE 1.5.x from here.
7
votes
Accepted
Changing pins used in ArduinoISP example
You can't change the pins.
ArduinoISP uses the SPI interface on pins 10-13 which is provided by the underlying AVR hardware.
7
votes
Accepted
Wire.h library works on Uno but won't compile for ATtiny85
You get this error, because the ATTiny85 doesn't have full I2C hardware. It only as an USI (Universal Serial Interface). This can be utilized to do the rest of the I2C protocol via software. There are ...
7
votes
Accepted
How to deep sleep ATtiny/ATmega (to run for years with batteries) but still detect a button press?
ATTINY's are designed to easily do this since they can wake from power down sleep mode by a pin change...
Basically you want to...
Connect a normally-open push button between an IO pin and ground....
7
votes
Optimizing code for ATtiny10
If the button is pressed by a human and your clock is high enough (MHz range), you can use a trick and get rid of the RNG.
You can replace it with a free running counter like this:
unsigned char count ...
6
votes
Ideas for setting I2C device IDs
Put the address in EEPROM. It's still "on the chip" but it can be programmed independent of the flash, and can be changed on the fly if deemed appropriate.
6
votes
ATtiny85 minimum setup to blink led
Ignacio Vazquez-Abrams has already outlined the schematics.
There must be a C program compiled and uploaded to it, just like an Arduino board would have.
There are however some differences ...
6
votes
Accepted
Is SoftwareSerial left out for the ATTiny85/84?
Short answer - no. It's not left out, on the contrary.
But before addressing to the compiler error you mentioned, a small clarification:
I downloaded the hardware from https://code.google.com/p/...
6
votes
Accepted
ATTiny 85 analog input pin number problem
See the analogPinToChannel function.
static const uint8_t A0 = 6;
static const uint8_t A1 = 7;
static const uint8_t A2 = 8;
static const uint8_t A3 = 9;
...
#define analogPinToChannel(p) ( (p) &...
6
votes
Accepted
Is the a low memory alternative to SoftwareSerial?
Simplest thing would probably be to edit your copy of SoftwareSerial.h
and replace #define _SS_MAX_RX_BUFF 64 on line
42
by something smaller. If your loop() runs fast enough (no delays, no
blocking ...
6
votes
Accepted
Measure Vcc on ATtiny13a?
The code you linked to measures the 1.1 V internal reference using
Vcc as a reference. The ATtiny13A cannot do that. It does have a 1.1 V
internal reference, but it can only use it as a reference for ...
5
votes
Accepted
Manchester Library Won't Compile for Attiny85
attiny is missing an option required to allow the Manchester library to function properly on ATtinyX5 devices, specifically definition of __AVR_ATtinyX5__ when a device is selected. In fact, it's ...
5
votes
Accepted
Operating / pin voltages ATTiny chips
Yes. As given in the datasheets, normal ATtinyX4/X5 chips can run with a supply between 2.7 and 5.5V inclusive, whereas the low-power versions can run between 1.8V and 5.5V. Mind the speed ...
5
votes
Accepted
Is it possible to program an Attiny85 with a USB-to-TTL converter?
Yes, it is possible.
Note that the FTDI chip (assuming that is what you have) can be accessed as either Virtual Com Port VCP or D2XX. Where VCP is the traditional method of using them as Serial Ports ...
5
votes
Accepted
Extract .hex from ATtiny45 using Arduino
Assuming the lock bits on the device haven't been set, sure. Simply prepare the Arduino for ArduinoISP, hook up the ATtiny45, and perform a read using AVRDUDE instead of a write (-U flash:r:foo.hex:i)....
5
votes
ATTiny85 Interrupt id vs pin when programming with Arduino
You can setup interrupts on the Attiny with some different code, but it works the same way. It's important to note that PIN Change Interrupts are triggered at BOTH Rising and Falling Edge
Pins:
...
5
votes
ATtiny85 minimum setup to blink led
Here is the absolute minimal schematic required to blink a LED beyond power and decoupling:
Refer to "Which resistor to use for this LED" to calculate the appropriate value for R1.
5
votes
Accepted
Where is the Aref pin for Attitny88
As shown in the detailed information for the ADMUX register in the ADC section of the datasheet, the ATtiny88 has no external voltage reference. Consider using a ATmega8 or ATmega88PB instead.
5
votes
Is it possible to reduce the size of this program to 1KB
There are several problems with your program as shown that make a good answer impossible. After I list those problems, I'll then proceed to give an answer, partly good, partly bad. The good part is ...
5
votes
ATtiny85 communication with computer through USB
Can an ATtiny85 ic communicate with a computer through USB?if yes,how should be the connection?
Have you checked the web? There are many such projects. Here is a link to one:
http://www....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
attiny × 284arduino-uno × 35
i2c × 28
arduino-ide × 26
attiny85 × 26
interrupt × 22
sleep × 17
timers × 16
usb × 14
softwareserial × 14
digispark × 14
power × 13
avr × 13
isp × 12
c++ × 11
avrdude × 11
programming × 10
library × 10
pwm × 10
bootloader × 10
led × 9
rf × 9
arduino-mega × 8
serial × 7
voltage-level × 7