Questions tagged [attiny]

An 8-bit, low power AVR microcontroller from Atmel.

Filter by
Sorted by
Tagged with
0
votes
0answers
40 views

Arduino to AtTiny change of pin interrupt behaviour?

I have a project which, to save on battery, is put to sleep until an interrupt pin is rising from LOW to HIGH. This works well on Arduino Nano, however the translation doesn't on the ATTiny. #include &...
0
votes
1answer
15 views

log STK500v2 commands while flashing a Mega

My final goal is to replicate the process with which the PC programs the arduino. I have gone through the commands.h file and made a couple of attempts to get the logic right. But no success at ...
2
votes
1answer
143 views

Measure Vcc on ATtiny13a?

I am trying to figure out if I can measure the Vcc of attiny13a, but the code I use for arduino's and attiny85 does not work. This is where I got the code from. I know that it works by using the 1.1v ...
1
vote
0answers
35 views

Arduino IDE on Attiny45: What kind of power does a chip need?

I have this little AtTiny45 which I'm loading a program with Arduino as ISP. My goal to use this chip along with a op amp, a piezo buzzer and a press button, and have it automatically sleep between ...
0
votes
2answers
409 views

Attiny85 Timer 1 comparator B doesn't work properly (while A does)

I'm writing a simple program that is using Timer 1 comparator B to generate a square wave on DEBUG_PIN. So my code at first turns on timer 1 with prescaler 8192 so that one tick is approximately 1ms....
7
votes
4answers
16k views

Can you access the EEPROM of an ATtiny with Arduino Code?

I'm attempting to reduce the amount of RAM being used by my program by writing some values to the EEPROM of my micro controller. I'm currently programming on the ATtiny85 which has 512 Bytes of EEPROM....
9
votes
2answers
21k views

ATtiny85 communication with computer through USB

I am trying to receive and send some data from a computer to an ATtiny through USB. Can an ATtiny85 IC communicate with a computer through USB? If yes, how should it be connected?
0
votes
0answers
65 views

Burning Digispark bootloader without an Arduino

I've been wondering if there is any method to burn a Micronucleus bootloader into a blank ATtiny85 Digispark using just Windows or a Linux distro, and not needing another Arduino board such as UNO ...
0
votes
0answers
64 views

Digispark green led being the only one to turn on

I was doing some tests with an ATtiny85 Digispark module using Arduino IDE on my Windows PC. I was testing some stuff with the DigiKeyboard library from Digistump. Everything was going fine until ...
0
votes
1answer
898 views

cannot get low power with Adafruit Trinket

I want to get as low power use during sleep as possible with an Adafruit Trinket. Based on results presented on various places in the internet (blogs etc), I expect to be able to go down to 50 - 100 ...
1
vote
1answer
36 views

How to specify a timer's name depending on the chip it will be compiled to?

I need to enable a timer interrupt for a chip, and in the mean time, I am testing the code on Arduino Nano rather than (feed the chip, test the chip)++. So as part of the code I have to TIMSK0 |= (1 &...
0
votes
1answer
36 views

Setup of Arduino Uno as ArduinoISP for programming attiny45

I have an Arduino Uno SMD and an attiny45, which I want to use as a sensor communicating via i2c. For a first step in finding out how to work with the attiny45 I just want to use the attiny as ...
6
votes
4answers
16k views

RF remote control using VirtualWire on ATtiny85 running at 8MHz on internal oscillator

I'm trying to make an RF remote control using ATtiny85 running at 8MHz on internal oscillator, this cheap RF 434MHz transmitter module (like the one below), and VirtualWire lib, but had no success so ...
1
vote
1answer
35 views

Weird assembly output

I was taking a look at the disassembly for a loop of mine that seemed to be taking too long and I found these assembly instructions that I don't understand. Why does it load 0 into r25 and then do two ...
5
votes
2answers
5k views

Can I connect an SD card shield to Digispark ATtiny85 board?

I have a Digispark ATtiny85 Arduino board (as shown in the picture). Can I connect a SD card shield to this board as a normal Arduino? How can I do that I'm new to this field?
0
votes
1answer
47 views

ATTiny84 fuses reading as 0

I was programming my ATTiny84 when it randomly stopped being able to be programmed. I have an external 32768 Hz crystal connected to it, and I have been using my Arduino UNO with the ArduinoISP sketch ...
0
votes
1answer
102 views

ATtiny85 - report error “Device reports version as: 2.2”

I've bought ATtiny, from see link. Trying to upload a basic Blink sketch I get this error: Device reports version as: 2.2. 1) Board manager was updated using http://digistump.com/...
1
vote
1answer
84 views

Interrupt every second on ATTiny84 (and sleep the rest)

I'm building a digital watch just like in this post, except I'm using an ATTiny84. However, the ATTiny84 doesn't have an asynchronous Timer2 like the ATMega328 and does not have a power save mode, so ...
0
votes
1answer
38 views

I keep getting this error exit status 1 expected ';' before 'DigiKeyboard'

\ here is my code include "DigiKeyboard.h" void setup() { DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(100); DigiKeyboard.sendKeyStroke(MOD_GUI_LEFT); DigiKeyboard.delay(100); ...
2
votes
2answers
3k views

Reliably duplicate custom IR remote control with ATTiny85

This is something I'm struggling with for a while and fail to find solid solution. The Arduino IR library provides method for recording arbitrary IR code and re-sending it. This gave me different ...
0
votes
0answers
27 views

Program ATTiny84 via Roshamglo in Arduino - USB Device does not appear in Linux

I recently bought a Roshamglo from SparkFun. This uses a Virtual USB connection to the ATTiny84. I cannot find the device once it's connect. I installed the board via https://raw.githubusercontent....
0
votes
1answer
221 views

Managing configurations via EEPROM by writing it with the hex file

I've been looking into I2C bootloaders for an ATTINY coprocessor on a board I'm developing, and I ran into a bit of a snag. I have the need to detect what board the main processor's code is running on,...
2
votes
0answers
1k views

Read string from DigiUSB

I wrote simple code for my Digispark (Attiny85 with Micronucleus bootloader) in Arduino IDE: #include <DigiUSB.h> String inst; void setup() { DigiUSB.begin(); pinMode(1, OUTPUT); } void ...
-1
votes
1answer
154 views

How do I set up an ATTiny861A-PU for flashing with Arduino Uno?

I have found instructions for 8 pin Tiny but none for my 20 pin. How do I set this chip up on the breadboard for bootloading with Arduino?
0
votes
2answers
643 views

Using ATiny102 as HID device(emulating mouse)

I am trying to make my own mouse/keyboard from an attiny (it doesn't have to be attiny102 as the title suggests). I have read many articles on this subject: some are using v-usb library.But I ...
0
votes
0answers
108 views

Radio receiver: deep sleep when no byte arrives, and wake up when a byte arrives?

This code works to listen for bytes via radio (with a 433 Mhz receiver module) with the Manchester library and Manchester code, and do an action when certain bytes are received: #include "Manchester....
1
vote
1answer
797 views

How to assign an interrupt to a button press with an ATtiny? (interrupt not fired with my code)

(Here is finally a solution). I'm using the following code on a ATtiny45 to assign an interrupt to a button press (pin #7, PB2, INT0). However the LED doesn't blink when the button is pressed, as if ...
3
votes
2answers
548 views

How to deep sleep ATtiny/ATmega (to run for years with batteries) but still detect a button press?

Question (TL;DR): what is the optimal method to deep sleep (to run an ATtiny45 or ATmega on batteries for 1+ year) but still be able to detect a button press? Is it possible to deep sleep until a ...
0
votes
3answers
391 views

PCINT0, PCINT1, PCINT2, etc. on ATtiny45/85

According to the datasheet: we could think that, if we want to have a pin change interrupt for 3 pins, we have to create multiple instances: ISR(PCINT0_vect){ ... } ISR(PCINT1_vect){ ... } ...
1
vote
1answer
228 views

How to control the power of attiny13a via pin change interrupt?

I'm trying controll the power of attity13a and turn off/turn on the led. I'm going to goals: After to click on the button0 led will blicking 5 second nad then the attiny13a going to sleep. After to ...
0
votes
1answer
129 views

Arduino IDE with ATtiny85 error “multiple definition of `__vector_5”

I am having a problem compiling the code for my ATtiny85 circuit. I am using the timer/counter0 in normal mode so that when it overflows it triggers the TIMER0_OVF_vect ISR. When I have that ISR in ...
0
votes
2answers
430 views

How to use ATtiny pins that are usually 'reserved' for chip programming?

How to program an ATtiny45 to use the pins 1, 5, 6, 7 (i.e. PB5, PB0, PB1, PB2) as input or output? pinMode(5, OUTPUT); pinMode(0, OUTPUT); pinMode(1, INPUT); pinMode(2, INPUT); digitalWrite(5, HIGH);...
0
votes
0answers
64 views

How to unbrick an ATtiny45?

I'm using an Arduino Uno as ISP Programmer to program a standalone ATTiny45 on a breadboard. Usually it works well, but I just uploaded a code like this: void setup() { pinMode(0, OUTPUT); # pin ...
1
vote
1answer
125 views

Having trouble figuring out CTC on Timer 1 with ATTiny85

I'm using Timer1 on the Attiny85 clocked at 1MHz to toggle an LED every 1 second. However, I'm having some issues regarding prescaler and OSC value selection. I'm using this formula, which I found in ...
0
votes
2answers
200 views

Use ATtiny85 to perform initial config on a Cisco router using its USB console port

We have 200+ brand new Cisco routers that have USB console ports (but not the old RJ45 serial console ports). This is quite frustrating because the routers didn't ship with console cables and Cisco ...
5
votes
2answers
171 views

Arduino IDE won't use selected port

I'm trying to program an ATtiny85, using an AVRISP mkII programmer (this one: https://www.amazon.de/dp/B00IYNAXUC/ref=cm_sw_r_sms_c_api_i_VXOWDb3H3N5ND) with the Arduino IDE (version 1.8.10 on Ubuntu ...
0
votes
2answers
1k views

Digispark ATtiny 85 - not recognised as HID device

I am trying to create auto-username-writer with Digispark ATtiny 85. I have a pretty simple sketch: #include <DigiKeyboard.h> void setup() { } void loop() { DigiKeyboard....
2
votes
2answers
1k views

Use std::list in Arduino programming

When trying to compile #include <list> std::list<byte> l = { 7, 5, 16, 8 }; in the Arduino IDE (with ATtinyCore for ATtiny4313), I get this message: error: list: No such file or ...
0
votes
1answer
84 views

Sending multi-byte data over I2C between different processors

I have been attempting to read data from an ATTINY84 via an ESP8266. Both are programmed via the Arduino IDE, though as PlatformIO is a proxy for that, I'm not certain what version of the ATTINY core ...
1
vote
1answer
199 views

Attiny85 Watchdog fires only once

I build something like a flashlamp with different modi. From the hardware site it's quite simmilar to the Nanjg105c. There is a Attiny85 which generates a PWM signal to an AMC7135. I have one push ...
2
votes
1answer
226 views

Current mouse pointer position with Digispark attiny85

I am trying DigiMouse library for attiny85 Digispark board. It allows to emulate the mouse quite well. However, I also need to know the current cursor position. Is there a way to get it?
2
votes
2answers
356 views

AtTiny85 and MMA8452Q accelerometer cannot connect using i2c

I am trying to connect the MMA8452Q with AtTiny85 using the TinyWireM library. I made the proper hardware setup with pull-ups on SCL and SDA pins - tested it on Arduino Uno and it works, however ...
0
votes
0answers
191 views

Attiny ADC at voltages less than 5v

So, this is peculiar. I am using an ATTINY84 chip as an i2c ADC converter (there are reasons why I'm using this rather than a dedicated chip, but that's not really relevant), and I've noticed that I ...
-1
votes
1answer
144 views

Increasing speed of Vl6180x Sensors

I have 5x vl6180x pololu ToF sensors. I have managed to hook up all of the sensors to the arduino via I2C by making each sensor startup at different times and when they do, changing their addresses, ...
0
votes
1answer
91 views

How can I adapt this code for the ATTiny85?

So I set up an Arduino circuit that while a button was pressed, a sound effect would play and an LED would activate until I stopped pressing the button. Since I didn't use a micro sd card module, I ...
0
votes
1answer
164 views

How can I make FastLED set every 2 LEDs to the same color?

I'm controlling an WS2812 LED strip in which every 2 leds is controlled together - they are setup as "eyes" in a prop. I'm looking to control hundreds of these, so in an effort to save RAM I'd like ...
0
votes
2answers
2k views

Problem with programming an ATtiny85: Error - avrdude: Yikes! Invalid device signature

I'm trying to program an Attiny85 chip using an Arduino Uno as an ISP following this two tutorials: Instructables: Program an ATtiny With Arduino and Programming an ATtiny w/ Arduino 1.6 (or 1.0) but ...
2
votes
0answers
882 views

Manchester 433MHz Nano to ATTiny85

My transmitter is a Nano, the receiver is a Tiny85. I use a Logic Analyzer to check if stuff is moving, I can clearly see data coming in at the receiver. The receiver does not 'decode' the data, man....
1
vote
0answers
908 views

ATtiny85 Comparator C interrupt on timer 1

I have a program that uses Timer1 comparator A in CTC mode. I realize that I need to set OCR1C for the timer to reset at given value. However there is no such thing as an interrupt generated by timer1 ...
1
vote
0answers
574 views

Manchester.h message format

I'm sending some data by 433Mhz transmitter using manchester.h library from here https://github.com/mchr3k/arduino-libs-manchester and I'm trying to wrap my head around message format. In manchester....

1
2 3 4 5 6