Skip to main content

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.

Filter by
Sorted by
Tagged with
2 votes
0 answers
47 views

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 ...
Torsten Römer's user avatar
1 vote
1 answer
173 views

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 ...
Torsten Römer's user avatar
0 votes
0 answers
35 views

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. ...
Torsten Römer's user avatar
0 votes
2 answers
190 views

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 ...
Torsten Römer's user avatar
1 vote
1 answer
145 views

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: ...
Cal-linux's user avatar
  • 2,264
0 votes
1 answer
154 views

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 ...
Cal-linux's user avatar
  • 2,264
2 votes
1 answer
179 views

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 ...
Erik Vincent's user avatar
0 votes
1 answer
181 views

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 ...
Cal-linux's user avatar
  • 2,264
13 votes
3 answers
5k views

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 ...
cornelius's user avatar
  • 265
1 vote
1 answer
215 views

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 ...
andy28's user avatar
  • 13
2 votes
2 answers
1k views

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 ...
turqay mammadov's user avatar
1 vote
2 answers
318 views

In AVR-libc page 143 the implementation of the function uart_putchar() is typical as the following: ...
NAND's user avatar
  • 498
4 votes
3 answers
2k views

I am writing in C using the Atmel Studio (AVR-C.) I have an if statement: if( (rxProcessing < (rxWritePos-1) ) ) Where ...
Christianidis Vasileios's user avatar
1 vote
4 answers
793 views

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 ...
Christianidis Vasileios's user avatar
0 votes
2 answers
295 views

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 ...
planespotter5000's user avatar
15 votes
3 answers
1k views

I recently compiled some C++ code for the ATmega1284P in Atmel Studio and was analyzing the timings of some routines using my scope. To my surprise, a loop I thought I had optimized was taking longer ...
Hackstaar's user avatar
  • 924
0 votes
1 answer
248 views

I've wire up ATMEGA64A-AU based on this schematic from here: I've tried to program a blink on pin B5 which has a LED on it: ...
diadra's user avatar
  • 19
1 vote
2 answers
111 views

I read the datasheet and this question, but there's still something wrong here. Here my wdt init code: ...
Mark's user avatar
  • 1,593
1 vote
2 answers
348 views

I was programming an ATtiny13A when I accidentally noticed that when I change the delay time in _delay_us() my code size changes. Here's the sample code: ...
Pouria P's user avatar
  • 320
0 votes
1 answer
221 views

I interfaced the 23LC1024 RAM module to atmega328. I have coded using embedded c on avr studio. The program flows like one byte is written to the address 0x000000 and Read data from the address ...
vishnu m c's user avatar
0 votes
0 answers
325 views

I am using ATxMega 32E5 and my current task is to rewrite existing RS485 driver and use DMA to save in my case valuable cycles (the speed is going to be multiplied by 8x going from 230k to 2M baudrate)...
Possible's user avatar
1 vote
2 answers
1k views

I've been able to build and run binaries successfully when I compile and link in one step. However if I try compiling but not linking with the -c option to ...
Phil Frost's user avatar
  • 58.2k
1 vote
0 answers
191 views

I'm writing a bootloader for ATXMEGA256A3U. At page 14, Table 7.1 of the datasheet I know the bootloader address start at 0x20000. Using AtmelStudio I set in the linker option the following ...
Mark's user avatar
  • 1,593
0 votes
3 answers
172 views

In my source code I have tried to allocate a huge buffer exceeding the RAMSIZE value (RAM of my component (ATmega324PB) is 2k). ...
doom's user avatar
  • 175
6 votes
7 answers
3k views

I am currently writing a program in AVR Studio, here is the build *Memory Usage : * ...
Danial's user avatar
  • 223
1 vote
2 answers
6k views

I have implemented C++ queue in my codes, those I run on my PC. Now I'm programming an ATmega128 micro-controller to implement a .c code. Can I use that ...
Maifee Ul Asad's user avatar
-1 votes
2 answers
190 views

I have this function for a 4x4 keypad: ...
Danial's user avatar
  • 223
3 votes
2 answers
413 views

I have this function to read key press from a 4x3 key-board: ...
Danial's user avatar
  • 223
0 votes
1 answer
151 views

I have this code to blink an array (8-led) of led one after one: ...
Maifee Ul Asad's user avatar
0 votes
1 answer
313 views

I'm currently try to connect a DS18S20 temperature sensor to the atmega328p. I have wired AVCC and AGRD to the same power rail on my breadboard as normal VCC/GRD and AREF is not connected. When I try ...
chishiki's user avatar
  • 117
1 vote
2 answers
2k views

I'm currently trying to connect a 7x5 dot matrix to an AVR ATMega328p. I'm already using port B/D and I would like to use port C so that I have extra output pins. My question is, can I use port C as ...
chishiki's user avatar
  • 117
1 vote
0 answers
166 views

I'm using an ATMEGA2560. Compiler: avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.5_1522) 4.8.1 I have setup TIMER0 for periodic tasks: ...
Daniel's user avatar
  • 1,164
1 vote
0 answers
632 views

I am working on a project to read files off of SD cards with an xmega128a4u via SPI. I noticed that some cards initialize without an issue. However, I have two cards that just wont. As far as I can ...
Hexum064's user avatar
  • 327
0 votes
1 answer
233 views

Background: I'm trying to get a gLCD working with an Atmega328p. I got it to work quite easily, but there was one catch: the library that I found, used portB for the datapins. This was unacceptable, ...
Opifex's user avatar
  • 605
1 vote
0 answers
527 views

I'm writing a code to enable and disable the watchdog timer in ATmega32. I'm using the function in the datasheet that disables the wdt. Also, I'm toggling led in the beginning of the code to know if ...
Gamal Othman's user avatar
1 vote
1 answer
356 views

I try to use a ATTiny10 to drive some APA102 LEDs. The LEDs are arranged in a 5x5 array. To draw something I stored some 'images' in PROGMEM. Program looks like this: ...
Steve 's user avatar
  • 165
0 votes
1 answer
571 views

I've been scratching my head for a few days over getting the NRF24L01+ modules to work on AVRs (ATMega328/p). I followed Gizmosnack's tutorial, not changing very much at all from his code. I've also ...
Orotavia's user avatar
  • 420
2 votes
5 answers
844 views

Most (all?) of the AVR family controllers provide some special GPIO registers. 4.8.1 General Purpose I/O Registers The lowest 16 I/O Memory addresses is reserved for General Purpose I/O Registers. ...
Rev's user avatar
  • 10.3k
2 votes
1 answer
1k views

I have written a simple SPI slave on an ATMEGA328PB. It mostly works, however, I can't seem to get the first byte to be what I want. The difference between the first, second, and all other attempts ...
evildemonic's user avatar
  • 9,693
3 votes
1 answer
1k views

On AVR GNU assembler I'm trying to create a label inside a macro definition. I would like to create a macro, which has a private lable, or unique label inside - just to be able to jump inside macro ...
Marcin Daw's user avatar
1 vote
2 answers
734 views

I have been trying to accomplish connecting ATmega32 and ATmega328 using SPI Hardware connections: ...
Pavindu's user avatar
  • 123
1 vote
2 answers
477 views

I'm trying to use the light_ws2812 library to drive WS2812 LEDs from an ATTiny414. The core of that library is an inline assembly snippet that bitbangs the serial line. here it is with the timing-nops ...
s-ol's user avatar
  • 113
1 vote
1 answer
1k views

Consider the following asm.S .global main main: rjmp main Compile and dump it with these commands: ...
Igor Liferenko's user avatar
4 votes
2 answers
511 views

I have a very strange issue of a possible memory corruption when using global variables and a timer overflow interrupt on the ATTiny10 (using avr-gcc 4.9.2). I can't make any sense of it but managed ...
pdenes's user avatar
  • 143
3 votes
1 answer
212 views

This line... if (thisWindowsSinceLastFlash <=1 ) { ...complies to this code... ...
bigjosh's user avatar
  • 10.4k
0 votes
0 answers
82 views

When I program my AT90USBKEY2 with dfu-programmer, the delays are wrong until I restart the board by unplugging it. ...
mtfurlan's user avatar
  • 101
0 votes
3 answers
69 views

I have an SPI module which has an initializer function: ...
arminb's user avatar
  • 1,644
1 vote
2 answers
859 views

I was trying to simulate on proteus ADC with potentiometer and get the reading to control dc motor with PWM it's working but the problem is the ADC value not accurate. ADCH reach max value before ...
user247954's user avatar
1 vote
2 answers
578 views

Hi, ​I'm having a problem with the USART_RX_vect interrupt of the ATMega 328p. The receiving works fine and I'm able to evaluate the sent bits (so it's not due to the baudrate) but everytime I send a ...
Ardupi de's user avatar
3 votes
2 answers
122 views

I'm trying to spoof a 433 MHz remote and I have a sequence of 32 bytes that I want to repeatedly shift out to one of ATtiny85's pins. The signal then goes to a cheap Chinese-type 433 Mhz transmitter. ...
Protecto's user avatar