Skip to main content

All Questions

Tagged with
0 votes
1 answer
80 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 ...
Cal-linux's user avatar
  • 2,153
1 vote
1 answer
156 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 ...
andy28's user avatar
  • 13
1 vote
2 answers
248 views

AVR-libc `uart_putchar` implementation

In AVR-libc page 143 the implementation of the function uart_putchar() is typical as the following: ...
NAND's user avatar
  • 498
0 votes
2 answers
193 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 ...
planespotter5000's user avatar
15 votes
3 answers
1k views

Avr-gcc using repeated addition instead of MULU instructions

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
  • 904
0 votes
1 answer
206 views

Why does port B5 on ATMEGA64A-AU malfunction after enabling USART function?

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
67 views

ATmega48PB: wdt in interrupt mode still reset the MCU

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

Changing delay duration in _delay_us() changes code size

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
0 answers
303 views

Implementing UART driver with Interrupts and DMA - UART_RXC ISR is executed only first time a character is received

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
0 answers
164 views

Relocation in MPLAB IDE X

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,235
0 votes
3 answers
129 views

Buffer exceeding ramsize do not produce error in avr-gcc

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
  • 171
6 votes
7 answers
3k views

Compress .hex file for micro-controller [closed]

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

Can I use C++ stl in avr-gcc?

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
151 views

Interfacing 4*4 keypad avr-gcc [duplicate]

I have this function for a 4x4 keypad: ...
Danial's user avatar
  • 223
0 votes
1 answer
113 views

How to use output PWM in AVR

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

15 30 50 per page
1
2 3 4 5
7