Questions tagged [attiny85]

An Atmel 8-bit AVR microcontroller.

Use this tag when a question relates to the Atmel ATtiny85 microcontroller.

This is a Microchip (who acquired Atmel) 8-bit AVR RISC-based microcontroller.

Product page: https://www.microchip.com/wwwproducts/en/ATtiny85

Flash:          8 KB
SRAM            512 bytes
Data EEPROM     512
Peripherals     (1)   SPI
                (1)   I2C
                (5)   Capture/Compare/PWM
Timers          (2)   8-bit
Comparators     1
Voltage Range   1.8 to 5.5 VDC
Pin Count       8
114 questions
3
votes
1 answer

How to use attachInterrupt() in ATtiny85 with Arduino IDE?

It's possible use external interrupts/attachInterrupt() with the ATtiny85 when I program with Arduino IDE? If is possible, how many inputs (for external interrupts) the ATtiny85 have and which are they? Someone have an example code?
Romildo
  • 31
  • 2
3
votes
1 answer

Flashing an ATtiny85 with a NodeMCU?

I recently purchased a Digispark for some of my smaller electronics projects. After it initially being a great little board, I soon found myself unable to flash the board in the same way I had done before i.e. according to the method described here.…
Rocco
  • 165
  • 5
3
votes
1 answer

Serial communication mac to Digispark ATtiny85

I want to use the Arduino IDE serial monitor with my Digispark ATtiny85 over USB. I can without problems upload this code(Digispark CDC example): #include void setup() { SerialUSB.begin(); } void loop() { …
hpekristiansen
  • 201
  • 1
  • 11
2
votes
1 answer

Attiny timer interrupt does not make an interrupt every 1000ms

I'm making a stopwatch using an attiny85, the idea was to use the timer interrupts to count the seconds my theory was: since I set the Attiny85 to run at 1Mhz, I can use a presale of 1024; 1000000 / 1024 = 976.5625 hz, 976.5625hz = 1.024ms, 125ms /…
2
votes
1 answer

ATtiny85 giving multiple wake from IDLE if INT0 held low

Desired behaviour: Go to IDLE sleep mode. When PB2 (blue trace) goes low wake up and give a 10 ms HIGH on PB1 pulling a pull-up low (yellow trace on Figure 1). Go to 1. What I get: Figure 1. (1) The input triggers, (2) the CPU wakes from sleep,…
Transistor
  • 629
  • 5
  • 14
2
votes
1 answer

ATtiny85 won't wake from sleep

My ATtiny 85 won't wake up! The purpose of the device is to monitor a reed switch and give a 20 ms output pulse on every alternate positive-going transition of the reed switch input. The device should go to sleep after 30 s of inactivity. It should…
Transistor
  • 629
  • 5
  • 14
2
votes
2 answers

How can i reduce my global variable use? Attiny85

I'm trying to compile my code but i keep exceeding my global variable memory by 12%. Is there anything i can do in my code to further reduce RAM usage? Or do i have to do modifications to the libraries I'm using? Here is my main program: …
Boyfinn
  • 95
  • 9
2
votes
0 answers

Attiny85 uploading error

I am getting an error while trying to upload programs to the Attiny85 through a USBTinyISP programmer, found here. Unfortunately, it isn't working. Following this tutorial for connecting the board and this tutorial for programming it with the…
user76915
  • 21
  • 2
2
votes
2 answers

What is "tws_delay" and how can I use it? (with an ATTiny85)

EDIT: Alright I'm stupid, I had the 2012 library installed somehow, maybe when I downloaded it indirectly from another old tutorial site. Thanks a ton to Peter Freerick for pointing that out! It finally compiled now So I'm currently doing a little…
2
votes
0 answers

Using an ATTiny85 and DigiKeyboard.h, can I detect when USB HID is connected?

I am building a project to send HID keystrokes to a computer with an ATTiny85. I want to detect when the USB communication is working, in order to turn on a LED saying that everything is good. If USB stops working, I want a watchdog to turn the LED…
2
votes
1 answer

Digispark ATtiny 85 erases flash after power loss

I have some issues with my Digispark ATtiny85 board. If I upload the blink sketch for example the LED starts blinking and everything looks fine. But as soon as I unplug the Digispark from the USB port and plug it back in nothing happens. I know…
leonardo
  • 21
  • 3
2
votes
1 answer

attiny85 reset itself instead of wakeup procedure

I have a digispark attiny85, and I am using SLEEP_MODE_PWR_DOWN to sleep, and wake-up with external interrupt on pin2. I am trying to count number of interrupts received with the code below. Problem is on every LOW signal on pin2, attiny85 reset…
ozkolonur
  • 121
  • 4
2
votes
2 answers

Attiny85 appears to be drawing 0.2mA current but battery running down more quickly

I am trying to get a temperature sensor (tmp36) working with an Attiny and if possible I would like it to run for several weeks. I have tried to power down the Attiny and it appears to be drawing only 0.2mA current when asleep, and around 4mA when…
Shara
  • 125
  • 10
2
votes
0 answers

ATtiny85 and MPU-6050 Gyroscope

I'm doing a project that involves sending MPU-6050 gyroscope data via serial communication to the laptop. Is ATtiny85 micro-controller suitable for this job? Is it powerful enough to do it? I was thinking of using an Arduino nano instead. please…
idk
  • 21
  • 1
2
votes
1 answer

Arduino Yún as ISP to program Attiny - why is the sketch not working after successful upload?

I want to use an Arduino Yun as ISP to program an Attiny85. I have soldered a shield following the circuit that is depicted in many sites. You can see it in this page. I have included a LED with a 1k resistor in series connected between pin 5 (PB0)…
1
2 3 4 5 6 7 8