Questions tagged [avr-gcc]

avr-gcc is a suite of executable software development tools for Atmel AVR RISC processors

avr-gcc is a suite of executable software development tools for Atmel AVR RISC processors, hosted on the Windows platform, has GNU GCC compiler for C/C++.

Atmel provides also an AVR Toolchain, which is a collection of tools/libraries used to create applications for AVR microcontrollers. The collection includes compiler, assembler, linker and Standard C & other math libraries.

Most of these tools are based on efforts from GNU (www.gnu.org), and some are developed by Atmel.

614 questions
0
votes
1 answer

Basic I/O in Microcontroller AVR using WinAVR

I want to drive a BLDC motor, i use ATMEGA32 as CPU of controller , i have a problem in reading hall effect sensor from BLDC motor this is my code…
Lukis triya
  • 1
  • 1
  • 4
0
votes
3 answers

AVR ATmega32U4 Timer compare interrupt not triggering

I tried to create a CTC timer interrupt on my ATmega32U4 leonardo board. When I continuously check the value of OCF1A I have no problem detecting when the output reaches the desired value, however once I move the code into an interrupt, the…
pluczak
  • 43
  • 2
  • 9
0
votes
1 answer

Input capture value is double in atmea128

I am learning embedded C with Atmega128 and Atmel Studio. I want to write code that shows the temperature and humidity from a sensor. I am learning Input Capture and my first question is: I get IC with value 5000(period) but I think 2500 is correct.…
samsoft
  • 21
  • 7
0
votes
1 answer

How does Contiki OS process external interrupts?

It is possible to wake sensor nodes on external interrupts that are generated by peripheral sensors. The following explains how Contiki OS handles external interrupts. In case of the ATmega128RFA1 the external interrupts INT0 to INT4 are able to…
ralf htp
  • 9,149
  • 4
  • 22
  • 34
0
votes
1 answer

check from preprocessor if -mint8 is used for compilation

Is there any c macro predefined if compiler option -mint8 is in use? Background: I can compile something for avr with the -mint8 compiler option which results in smaller code size. That violates against the c standard, but this is not the problem…
Klaus
  • 24,205
  • 7
  • 58
  • 113
0
votes
1 answer

eclipse - Linking together OpenCV libraries and Arduino Sketches

I am trying to incorporate OpenCV libraries in Arduino sketches using Eclipse. As a start, I separate the 2 prjects, OpenCV code and a simple Arduino sketch. They both compile and run beautifully in separate projects after linking everything OpenCV…
LeggoMaEggo
  • 512
  • 1
  • 9
  • 24
0
votes
1 answer

avr-gcc compiles too large optiboot hex to suit

I'd like to modify Arduino Uno's bootloader (optiboot) in order to increase upload commands timeout from 1s to 8s. So i need to recompile bootloaders and upload it. I was able to replace deprecated '-mshort-calls' to '-mrelax' and i'm able to…
4ntoine
  • 19,816
  • 21
  • 96
  • 220
0
votes
1 answer

AVR Atmega8 ADC input causes Crash

i am trying to Read an Voltage Level via a ADC0 of my ATmega8, because of querying a 1 Pin 4x4 Matrix Keypad. The Problem is everytime I apply a Voltage to the ADC higher than GND the Atmega is stopping to do his work. The PWM outputs are still…
0
votes
1 answer

How to compile arduino core library with makefile?

I want to create library files (.a) of the arduino core library, eventually also the other libraries (SPI, ...), with a makefile, but I can't get it to work! This is my makefile:…
Fabio
  • 191
  • 12
0
votes
1 answer

Issue with Null terminating string display

I have written small piece of code for displaying data in 2x16 character LCD. char str2[] = "Hello Welcome"; char *ptr2=str2; initializeLCD(); sendLCDCommand(CLEAR_DISPLAY); while(*ptr2) { displayInRow1(ptr2++); CL_delayMS(300); } In this…
Mahesha Padyana
  • 431
  • 6
  • 22
0
votes
2 answers

arduino uno with 8-bit MCU (ATmega328) but program with 32-bit C/C++ program

I would appreciate it a lot for your patience to explain on a seemingly naive question? An Arduino Uno with 8-bit MCU (ATmega328), yet we program it with 32 bit C program customs? why? Arduino Uno(for example), uses the 8-bit AVR MCU (ATmega328),…
rayzi001
  • 45
  • 3
0
votes
2 answers

32 bit number handling with ATTiny and Atmel Studio

I am wondering how the ATTiny, specifically the ATTiny24 stores 32 bit unsigned ints in memory. I'm trying to take a 32 bit value and write it to a 32 bit location in the EEPROM. I have attempted to use a simple mask, but every time I try, I get…
soupaloop
  • 3
  • 3
0
votes
2 answers

AVR: volatile variable resetting to zero

I have an interrupt service routine that contains the variable count and a variable state that changes when count reaches a certain value. What I want my code to do is change and maintain state for a certain period of time determined by the value of…
Satchan
  • 1
  • 3
0
votes
1 answer

displaying Hexadecimal value in LCD

I wrote LCD interface program for Atmega328 (Though there are libraries available, I wanted to write from scratch). But have two problems. 1. Sometimes LCD does not display correctly. Only few strips are seen. I end up in resetting once or twice. 2.…
Mahesha Padyana
  • 431
  • 6
  • 22
0
votes
1 answer

Realization of Truth table in C

I want to set various clock sources in a function as per the truth table below. Basically I want to write to the TCCR0B register(Atmega328) according to the parameter I pass to setClockSource function. The image of the table and registers is given…
Mahesha Padyana
  • 431
  • 6
  • 22