ATtiny is a range of programmable 8-bit AVR microcontrollers by Atmel.
Questions tagged [attiny]
160 questions
5
votes
4 answers
ATtiny167 and Attiny87 NOT backwards compatible due to JMP vs RJMP. How to resolve
The problem I face is that the Attiny167 and Attiny87 despite on the datasheets saying they are drop in replacements are in fact not. The program is written in AVR assembly.
The vector table for the Attiny87 uses RJMP meanwhile the Attiny167 uses…

goofson
- 51
- 1
5
votes
3 answers
uint64_t variable with & operations
I have a function which is searching for series of nine "1" in 64-bits variable(RFID tag number) and if found, moves them to the MSB.
I have a huge problem with understanding why it does not work properly.
This is my variable
uint64_t volatile…

Adam Flis
- 51
- 4
5
votes
1 answer
AVR timer overflow interrupt not working
Hello good people of stack overflow. My problem is an interrupt service routine (ISR) that seemingly never executes! Here's some info on my set up:
I am flashing an avr attiny85. I have the bare bones of a project set up so far with simply a…

chen
- 187
- 5
- 16
3
votes
1 answer
Why can't I change the PWM output pin in ATTINY1616?
I have started to dive into MCU programming and have been working with some basic codes. I first did it with Arduino but now I'm trying with an ATTINY1616 MCU and I'm hardstuck in how to create a PWM effect that dims a LED on and off. I thought I…

Collapsedblock6
- 33
- 4
3
votes
2 answers
What does this mean? #define TIMER_PASTE_B(lft,t,rgt) lft##t##_##rgt
I found the following function definition in the ATTiny85 tone core library. I cannot figure it out what does that mean, or how it works. It is used very often to create function names, but not sure how the syntax works.
Here is a trace back that I…

Sodanetworks
- 105
- 1
- 9
3
votes
1 answer
NRF24L01 with ATTiny and Uno not connecting
I have an ATTiny85 connected to an NRF24L01+ module using this wiring diagram: diagram. The ATTiny85 periodically goes in and out of sleep to send some value to a receiver, an Arduino Uno. If the ATTiny is running off the Arduino power supply…

Alex Wulff
- 2,039
- 3
- 18
- 29
3
votes
10 answers
tinyAVR: best known multiplication routines for 8-bit and 16-bit factors?
"Faster than avr200b.asm"? The mpy8u-routine from avr200b.asm for those processors of Atmel's AVR family that do not implement any of the MUL instructions seems pretty generic, but mpy16u looks sloppy for rotating both lower result bytes 16 times…

greybeard
- 2,249
- 8
- 30
- 66
3
votes
2 answers
Recommend Attiny85 compiler/IDE
I need to compile C project for Attiny85 but not sure which compiler to use - free if possible. Is Atmel Studio a good choice?

i486
- 6,491
- 4
- 24
- 41
2
votes
1 answer
Enabling ATTINY1626 UART RX interrupt doesn't trigger ISR, how to resolve?
I have a receive interrupt issue with ATTINY1626. In pooling mode I can able to receive UART data. But it is not happening by enabling UART RX interrupt. I don't know where I missed some configuration related to interrupts.
Please suggest me if…

user3534806
- 21
- 1
2
votes
1 answer
Fatal error in avr-gcc, specifies incorrect MCU
I am learning to program my ATtiny85 without a bootloader using a MiniPro, and I want to generate a hex file. First I try to compile my file using the avr-gcc command, but I get an error that states:
Fatal error: unknown MCU: gcc-isr
This is the…

frogstair
- 444
- 5
- 20
2
votes
3 answers
Trouble programming AVR to interpret input from Arduino rotary encoder module
I've been trying to program my ATtiny817-XPRO to interpret input data from a rotary encoder (the Arduino module), however I'm having some trouble and can't seem to figure out what the problem is. What I'm trying to do is essentially program a…

Jacob M
- 147
- 3
- 10
2
votes
1 answer
Arduino/Attiny85: Delay in ISR and port manipuation
I'm trying to have on a pin an output inverted related to another output playing a tone(), but there is a delay of 35us @8MHz or 158us @1MHz clock. It seems there is a fixed 16us +142 clock cycles delay, because delay is not inversely proportional…

Gianluca
- 21
- 2
2
votes
1 answer
ATtiny85 PWM lower frequency than expected
I am new to programming MCUs and am trying to use PWM on an ATtiny85. I have looked around online for various tutorials and have managed to get it working with the code below. My problem is that I expect the PWM frequency to be 8MHz/256 = 31.25kHz,…

spacenut1
- 41
- 4
2
votes
1 answer
ATTiny84a and RFM12b issues
Im trying to set up the attiny84a and the RFM12b with the Jeelib library for arduino. It works perfectly with the arduino but not with the ATTiny. We are 3 people that have tried to solve the problem tree days without luck.
We can easily upload the…

Mads Gadeberg
- 1,429
- 3
- 20
- 30
1
vote
1 answer
Weird behaviour when enabling interrupts for CTC mode onTimer0 on ATtiny85
I'm using an ATtiny85 for a simple IR project built on C (an IR remote for a DSLR camera). I generated a 38.4 kHz square signal using Timer 0 in CTC mode and set the output to toggle PB0 every time the timer reaches it's max value OCRA. I wanted to…

Mauricio Aravena
- 43
- 7