Questions tagged [attiny]

ATtiny is a range of programmable 8-bit AVR microcontrollers by Atmel.

120 questions
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
  • 3
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
  • 158
  • 4
  • 16
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
  • 95
  • 1
  • 7
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
  • 1,979
  • 3
  • 13
  • 27
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,015
  • 5
  • 20
  • 51
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,083
  • 3
  • 21
  • 37
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
  • 125
  • 2
  • 9
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,356
  • 3
  • 18
  • 28
1
vote
1 answer

ATTiny serial communication does not work at 3.3V with ESP8266 (NodeMCU V3)

I am transmitting data from ATTiny85 to ESP8266(NodeMCU v3). I am powering NodeMCU using USB cable. It works fine when I power up ATTiny using 5V. However I'm planning to transfer my project to ESP32, which is not 5V tolerant. Therefore I have to…
1
vote
1 answer

TinyAVR 0-Series: Can I use pin-change sensing without entering interrupt handler?

I am evaluating the ATtiny806 running at 20MHz to build a cycle-accurate Intel 4004 microprocessor emulator. (I know it will be a bit too slow, but AVRs have a huge community.) I need to synchronize to the external, two-phase non-overlapping clocks.…
mcpublic
  • 15
  • 4
1
vote
5 answers

AVR assembly - bit number to mask

In my ATtiny84a AVR Assembly program I end up with a bit number between 0 and 7, in a register, lets say r16. Now I need to create a mask with that bit number set. To make it more complicated, the timing of the operation must be the same, regardless…
Max Kielland
  • 5,259
  • 7
  • 49
  • 86
1
vote
1 answer

ATTiny85 - Software UART with Timer1

So recently I tried to implement Software UART (TX only) for the ATTiny85. I want to drive it with the internal Timer1. The timer shall interrupt with the frequency of the Baudrate. Every ISR one bit will be transmitted, until there is nothing left…
vipeout
  • 13
  • 4
1
vote
1 answer

How do I output a compare match to OC1B in Fast PWM mode on the ATtiny84?

My goal is to output a PWM signal from my ATtiny84 with 1ms high at 50hz. The clock is operating at 1mhz, so I've set the compare output mode such that the output pin should be cleared for 19000 clock ticks and be set for 1000. The device is…
Koraken
  • 115
  • 1
  • 11
1
2 3 4 5 6 7 8