Questions tagged [avr]

AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the first generations of the popular Arduino SBCs.

Atmel uses the AVR core in both 8- and 32-bit microcontrollers. All AVR devices use a modified Harvard architecture and a RISC core, and have a (near) 1 MIPS/MHz performance. None can execute code from external memory or RAM. The series includes the ATtiny, ATmega, ATXmega, and AVR32 controllers. The Arduino development board uses an ATmega32.

See also Atmel's homepage and the Wikipedia page.

This tag should be applied to questions which involve the issues specific to AVR microcontrollers. It need not be applied to all questions which involve an AVR, for instance, questions about work within the Arduino environment should receive the tag.

What does AVR stand for? According to Wikipedia:

Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for. However, it is commonly accepted that AVR stands for Alf (Egil Bogen) and Vegard (Wollan)'s RISC processor.

related tags:

1885 questions
65
votes
3 answers

What is a boot loader, and how would I develop one?

I've met many projects in which an AVR microcontroller uses with a bootloader (such as the Arduino), but I don't understand the concept very well. How can I make a bootloader (for any microcontroller)? After writing my bootloader, how it is…
mina_g
  • 1,355
  • 4
  • 18
  • 21
51
votes
17 answers

Complete alternatives to the Arduino IDE?

I'm not that big of a fan of the official Arduino IDE (in terms of visuals), so I've started looking for nicer alternatives. However, most of the projects I've found are in alpha/beta and are generally incomplete. I'm 100% new to circuit board…
n0pe
  • 880
  • 3
  • 12
  • 22
46
votes
10 answers

Why is AVR used in Arduino?

Why is Arduino using AVR? I understand that they are the official processor but there isn't a reason the code couldn't be ported to an ARM or a Freescale architecture other than cost, right? As long as there is onboard memory, I figured there could…
Chris Gammell
  • 1,541
  • 1
  • 12
  • 25
42
votes
5 answers

Who receives the value returned by main()?

I know that in computers, value returned by the main() function is received by the operating system. But, what happens in the main() function of a microcontroller?
user18118
  • 551
  • 1
  • 5
  • 5
41
votes
10 answers

SPI or I2C: which to use for a longish bus

I'm contemplating a project that would require several AVRs talking to each other over a bus. They'd be separated by as much as 6 feet. It seems like both I2C and SPI can let a series of micros communicate over a bus, but I haven't seen anything…
edebill
  • 2,509
  • 2
  • 20
  • 26
37
votes
1 answer

Why does my AVR reset when I call wdt_disable() to try to turn the watchdog timer off?

I am having a problem where executing a disable watchdog sequence on an AVR ATtiny84A is actually resetting the chip even though the timer should have plenty of time left on it. This happens inconsistently and when running the same code on many…
bigjosh
  • 9,888
  • 29
  • 48
35
votes
2 answers

What is bit banging

I am new to microcontroller programming. I am using ATmega32-A controller and CodeVisionAVR compiler. I am using the waveform generator(AD9833) to generate a sinewave signal using SPI communication. I am able to generate the sinewave successfully.…
verendra
  • 1,223
  • 2
  • 14
  • 23
33
votes
5 answers

How do devices like the Game Boy Advance achieve their frame rate?

I've been designing my own handheld gaming device based around an AVR microcontroller and a small OLED display. I started off with a monochrome display 128x64 pixels and can comfortably draw to it at over 60 frames per second. I recently reworked it…
MalphasWats
  • 596
  • 1
  • 4
  • 15
31
votes
2 answers

A PCB for a Drone

I'm making a drone, and would love if somebody can review my work on the PCB layout. Image (red is top, blue is bottom, circles indicate holes and side transfers purple is glue): What is supposed to happen: Input from the radios is PWMs 1-6, which…
user86234
28
votes
5 answers

Due to overcurrent, shouldn't I be extremely cautious when setting an I/O pin as Output?

The question can be applied to any microcontroller with I/O capabilities, but I’m currently working with the popular ATmega328p. Consider the following circuit: A simple SPST Normally Open switch with a 10k pull-up resistor and a ceramic capacitor…
26
votes
6 answers

ATMega8: why do VCC and AVCC have to be connected?

I often read that it is good practice to connect VCC with AVCC. Even in the ATMega8 datasheet it says so: AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6). It should be externally connected to VCC, even if the …
Peter
  • 385
  • 1
  • 4
  • 5
26
votes
6 answers

Using the ATMega328 with the internal oscillator?

I have a project that I think would be best suited for an ATMega328P. However, in every simple project I've seen, people always hook up a 16MHz external oscillator. From what I can see, it should have an 8MHz internal oscillator. My project doesn't…
Earlz
  • 3,346
  • 15
  • 46
  • 66
26
votes
3 answers

What are Atmel Fuses?

What are Fuses in Atmel microprocessors and when I should or need to change the default settings?
tuupola
  • 1,657
  • 2
  • 17
  • 21
25
votes
6 answers

Why are Atmel AVRs so popular?

A recent question asked about the advantages/disadvantages of various types of MCU. AVRs seemed not even worth a mention given the answers. Why then does it seem to an outsider that AVRs are experiencing a rush of popularity? Is this solely due to…
Tim
  • 447
  • 1
  • 6
  • 14
24
votes
3 answers

AVR - How to program an AVR chip in Linux

I recently got an AVRISmkII AVR programmer, and I have an ATtiny85 and ATmega328. I was wondering how I could program these chips (with the programmer) but when I try getting Atmel Studio 6 it is only for Windows. Is there a way I could use in Linux…
user151324
  • 780
  • 3
  • 12
  • 21
1
2 3
99 100