All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
2answers
274 views

Polling several buttons from an interrupt

I am trying to poll 3 different buttons from a watchdog time out interrupt, on an ATtiny13. My code works perfectly for individual buttons, however I can't seem to be able to poll all 3 in a loop. ...
0
votes
1answer
124 views

code not following the procedure

I am currently working with ATTiny1634, executing the following code After executing break statement the program is not exiting from the inner while loop to outer while loop; instead, it jumps to ...
2
votes
1answer
287 views

Avr-gcc does not compile correctly without optimizations, but works (badly) with -Os

I am developing software for attiny88 with avr-gcc toolchain. This is a cheap microcontroller with 8kB program memory, 512B SRAM and 64B non-volatile EEPROM data memory. This is all sufficient for the ...
0
votes
2answers
173 views

“If” wrong interpreted when ADC=1023?

My code on ATtiny13A: ...
3
votes
1answer
661 views

AVR PWM timer frequency

I'm learning how to use an Attiny84. I've generated a fast pwm signal. I managed to understand how to do this: ...
2
votes
4answers
783 views

AVR GCC: How do I improve code optimization

I tried to compile the following C code: period = TCNT0L; period |= ((unsigned int)TCNT0H<<8); The assembler code I'm getting is the following: ...
3
votes
2answers
4k views

Memory management problems with ATTiny85

The setup is as follows: I have a little program to drive single color 8x8 led matrix using 595 shift registers that are supplied with data by ATTiny85 through USI as SPI Master. I upload program to ...
1
vote
1answer
302 views

arduino-tiny: change TIMER_TO_USE_FOR_MILLIS from sketch

In the arduino-tiny core, is it possible to change TIMER_TO_USE_FOR_MILLIS in the sketch itself? I want to be able to leave my arduino-tiny install stock but swap the timers just for one sketch. I'...
11
votes
2answers
9k views

Program AVR EEPROM directly from C source

When you include the following code in an AVR C source, you can apparently directly program the fuses, without the need for an extra command or .hex file: ...
2
votes
2answers
2k views

Setting up an ATtiny45 as I2C master - SCL toggles low, but refuses to toggle high

Another pin, another question: However closely related to Setting up an ATtiny45 as I2C master - SDA stuck low this is different question. I'm trying to control a DAC from an ATtiny45, but somehow ...
2
votes
1answer
1k views

Setting up an ATtiny45 as I2C master - SDA stuck low

I'm trying to control a DAC from an ATtiny45, but somehow the SDA line is stuck low. To find the problem in the code I did the following: I simplified the circuit to only the controller with the pull ...
3
votes
2answers
3k views

avr attiny84: wrong delay

I'm pretty new to avr programming. I'm facing a strange problem that I can't solve so far. I've wrote a simple code: ...