Questions tagged [avr]

AVR refers to two families of either 8- or 32-bit RISC microcontrollers

The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

External links:

2299 questions
0
votes
1 answer

Show timer on LCD ,AVR

How to write a timer in c for avr that shows below pic in each row on LCD ? (https://i.stack.imgur.com/SK1mE.jpg)
Kimo
  • 1
0
votes
1 answer

AVR define pins with struct or #define

I've seen many people say "always use a #define to define the pins and ports of something in a library" and currently, this is what i do, too. But i am considering using a struct instead of this method. I use the example of a shiftregister and it's…
Lofter
  • 5
  • 1
  • 4
0
votes
1 answer

Atmel Studio override interrupt vector

i need to override the interrupt vector generated automatically from Atmel Studio. can anyone help me with this ? Update with the interrupt code generated by the Atmel Studio. 00000000 <__vectors>: 0: 0c 94 34 00 jmp 0x68 ; 0x68…
Radu
  • 73
  • 1
  • 3
  • 10
0
votes
1 answer

synthesizer - recording pressed keypad

I have to build synthesizer and I am using C for programing my ATmega128A. I need to record the keypads pressed and play them after some time. For keypad press I am using polling in the main.c. For playing the keypads I am using Timer1. Every time…
Madina
  • 25
  • 7
0
votes
1 answer

Qt ReadyRead and AVR devices

I have used Qt with an Arduino UNO to build a data acquisition system. Now I want to migrate that to Qt with an AVR ATmege32u4 microcontroller. Please look at the code below. I am reading incoming serial data with Qt triggered by the ReadyRead…
MichaelT
  • 111
  • 3
0
votes
1 answer

Undeclared Identifiers in header file with AVR-GCC

I created the following header file with definitions for AVR pins to be used in my code. #define LED_PORT PORTB #define LED_PIN PINB #define LED_DDR DDRB #define LED0 PB0 I encounter two failures I am not able to…
sesc360
  • 3,155
  • 10
  • 44
  • 86
0
votes
1 answer

Setting two different baud rates in AVR USART

I need to set baud rate of USART to 9600 to receive data from PC. Then I need to change it to 300 to send data to other device. Can AVR work with different baud rate ?
Ganesh S
  • 21
  • 1
  • 4
0
votes
1 answer

Why won't avrdude flash my attiny44?

I have been able to flash both my attiny85 and my attiny44 many times in the past but for some reason, recently I can't flash my attiny44 and get this error: "avrdude: initialization failed, rc=-1 Double check connections and try again,…
chen
  • 187
  • 5
  • 16
0
votes
1 answer

Read Array Value From SRAM AVR Assembler

I im learning avr assembler and would like to ask how can i read specific value from array? Here is my code that works very well and it stores digit array into SRAM...now how for example i could read value 6 from digit array? .include …
Igor Petev
  • 597
  • 2
  • 6
  • 24
0
votes
1 answer

Arduino AVR interrupts mask clearing

I'm building some soft using firmata protocol (firmata protocol) to provide few functionalities on arduino and manage board over USB. I connect to arduino dimmer with zero-cross and wrote custom protocol commands to change state of dimmer (Dimmer…
kris14an
  • 741
  • 7
  • 24
0
votes
0 answers

Flashing a hex file into AVR microcontroller

I am using a QT creator to program for AVR (ATMEGA328P) to be specific. I have linked to the toolchain and included the libraries. I have specified my programmer as arduino in the .pro file. However, avrdude displays an error that programmer is not…
Rufusy
  • 11
  • 1
  • 4
0
votes
1 answer

Return the program where you want manipulating the stack pointer

Wello guys, Im trying to manipulate the stack pointer and after the return of the "go_to_func" function the program will return to the start of "func" function and turn on the PORTD bit 3. I had tried the code below and it's dosen't work, the…
Radu
  • 73
  • 1
  • 3
  • 10
0
votes
1 answer

XMEGA Setting up SPI and reading WHO_AM_I_A register from LSM330 device

So I am having a tough time setting up my SPI, and getting it to work with the LSM330 device to read accelerometer data. I'm simply setting up the SPI system, and trying to use that to read the WHO_AM_I_A register to confirm that it is working and…
Scott
  • 395
  • 1
  • 3
  • 14
0
votes
1 answer

I cant send char array values over USART (Avr Atmel studio )

I am trying to use usart with avr . But i couldn't send full string. 1 char at time works but char array i cant send. Please i am open all suggestions . I am just missing something important and couldn't figure out own my own.. Here is my code: void…
user3978484
0
votes
1 answer

Defined parameter not visible from following included header [AVR C++]

I can't figured out what's wrong with the following code. I'm building an AVR project in C++. I need to define some parameters that are to be used in different parts of the project. More specifically I want to define the CPU frequency in order to…
Buzz
  • 1,102
  • 1
  • 9
  • 24