Questions tagged [avr-gcc]
AVR-GCC is part of the GNU Compiler Collection (GCC) collection of open source compilers that targets the popular AVR microntroller produced by Atmel. It supports both the C and C++ languages.
129 questions
2
votes
0
answers
46
views
Does the RFM95 lack a "PayloadReady" timeout interrupt?
I am doing a blocking receive with timeout of a small packet with an RFM95 (FSK mode) and an AVR 8-bit MCU.
Before going to RX mode, both "PayloadReady" and "Timeout" interrupts ...
1
vote
1
answer
166
views
SD card and RFM69 radio module on same SPI bus not working?
I am trying to operate a MicroSD card and an RFM69 radio module on the same SPI bus with an AVR 8-bit MCU without success. While the radio module (as usual) works just fine, SD card initialization ...
0
votes
0
answers
33
views
Temperature susceptibility, frequency deviation and receiver bandwidth
For fun and to learn, I am writing a simple driver for RFM69HCW radio modules. So far I'm impressed of the high transmission reliability and the long range, but there is one thing I am unsure about.
...
0
votes
2
answers
189
views
Just -65 dBm, are simple wire antennas really that bad?
Short answer: No, they are not. See update below.
I am writing a simple driver with avr-libc for RFM69HCW radio modules. Transmitting and receiving single packages works fine so far.
I don't know much ...
1
vote
1
answer
142
views
I2C on ATtiny441
I have a setup where a board (custom-made, designed by us) with an ATmega32U4 communicates via I2C with a second board (also designed by us) with an ATtiny441.
The communication is extremely simple: ...
0
votes
1
answer
143
views
Simple I2C communication between two ATmega32U4s -- first transmission works, then it hangs
I have two (different) boards, each based on the ATmega32U4. Both are programmed bare-metal, in C with avr-gcc. Board 1 has USB functionality, using the LUFA library (I started with the USBtoSerial ...
2
votes
1
answer
169
views
In AVR-GCC, I am trying to get an atmega328p to sleep and then wake on USART RX, but it locks up
My hardware is pretty straight forward. I have an ATMEGA328P hooked up with an LED on PB5, primarily to troubleshoot, and a wire that connects PD2 (INT0) to PD0 (RX), hoping to use INT0 to wake up the ...
0
votes
1
answer
172
views
How to identify all AVR MCUs (ATtiny and ATmega) that feature a factory-programmed unique ID
On Microchip's site, the "parametric search" table for microcontrollers does not have a filter column to select the models that feature a unique ID. Is there a way to list (enumerate) all ...
13
votes
3
answers
5k
views
Why does compiler optimization flag cause function definitions other than main() to break program in AVR ATMega C code?
I am using avr-gcc and avrdude to write programs onto an ATMega8515 micro-controller. I have got the blinking LED program working without a hitch. However, when I started to use interrupts and ...
1
vote
1
answer
211
views
avr-gcc optimization deleting register writes on ATTiny402
I'm using avr-gcc (12.1.0, built with this script: https://github.com/ZakKemble/avr-gcc-build) to compile for the ATtiny402 and encountering problems with code optimization. Specifically, the compiler ...
2
votes
2
answers
1k
views
How do I measure a pulse width using the ATmega328P interrupts and timers?
I am using an ATmega328P MCU with an 8 MHz internal oscillator. I need to measure the pulse width of an incoming pulse. The frequency of this pulse is approximately 500 Hz. Once every 2 ms, one pulse ...
1
vote
2
answers
312
views
AVR-libc `uart_putchar` implementation
In AVR-libc page 143 the implementation of the function uart_putchar() is typical as the following:
...
4
votes
3
answers
2k
views
Convert the type of calculation result in if() to uint8_t
I am writing in C using the Atmel Studio (AVR-C.)
I have an if statement:
if( (rxProcessing < (rxWritePos-1) ) )
Where ...
1
vote
4
answers
781
views
Atmel SPI "wait for transmission complete" example is wrong?
I am configuring my first SPI transmission on my atmega328p.
Everything seems right (My SPI interrupt ISR(SPI_STC_vect) fires when transmission is done, and I can see all SPI pins on the oscilloscope ...
0
votes
2
answers
288
views
Where to find documentation for definitions for AVR programming in C
I wonder if there is a documentation for AVR (I am using C to program) definitions like PIN5_bm or SLEEP_MODE_PWR_DOWN, or if I ...