We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [avr]

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

Filter by
Sorted by
Tagged with
12
votes
5answers
5k views

“Overclocking” an AVR

In AVR datasheets under the Electrical Characteristics section you will typically find a graph like this (this one is from the ATMega328): I've seen designs that seem to "work" but operate outside ...
20
votes
4answers
7k views

Crystals and load capacitance

If a crystal has a rated load capacitance of 6 pF, is the right thing to do to put a 6 pF capacitor to GND on either leg of the crystal? I'm using it as the clock source (TOSC) for an XMEGA and it's ...
53
votes
3answers
93k views

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)...
3
votes
3answers
2k views

12 hours delay with ATmega16A

I am trying to turn on a LED for 5sec every 12 hours. I tried: ...
1
vote
1answer
1k views

How to control 4 relays with a not chip (7404)

I have a atmega8 that is working with 3.6V dc, I need to control some 12V relays with a not chip (7404), what is the simplest way to do this? I have connected a 12V dc to the relays, so when I connect ...
11
votes
10answers
9k views

Linux / Mac AVR Programming Suite?

I have been coding and using Arduinos for quite some time now. However I am ready to move up to using straight AVR chips without the arduino bootloader. My question is what are resources to do this? ...
1
vote
1answer
2k views

how can i control servo motor with Pwm output of a microcontroller

i wanted to control the direction of servo motor with switch. i am using atmega32, output are PIND4 and PIND5 and the input is PINA3, but the two servo motors turn only in 1 direction ...
34
votes
4answers
3k views

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 ...
9
votes
3answers
2k views

Data retention on a microcontroller

Just reading the datasheet of the attiny13 it says that it can hold its data for 20 years at 85 degrees Celsius and 100 years at 25 degrees Celsius. Is this irrespective of the read and writes on ...
6
votes
2answers
9k views

Driving a relay directly with a microcontroller?

Are there any microcontollers on the market that would be able to drive this relay directly? If not, what is the most cost effective way to have a microcontroller control 5 relays?
2
votes
3answers
3k views

Playing sounds on an AVR MCU [closed]

I never had to deal with sound and I am pretty sure some of you guys have some experience in that kind of application. My question is more about getting some tips on the different ways to implement ...
50
votes
17answers
35k views

Complete alternatives to the Arduino IDE? [closed]

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 ...
15
votes
2answers
34k views

Protecting AVR flash from reading through ISP?

I'm trying to protect whole flash from reading through ISP. It has bootloader, able to self program application section. Setting lock byte to: LB1/LB2 will not ...
20
votes
8answers
7k views

Suggestions for small and handy connector for in-circuit programming?

I have many PCBs that use an AVR in SMD packaging, and since I frequently change the firmware in prototype boards, I'm trying to come with the best solution to program the AVR quickly and easily. The ...
12
votes
6answers
2k views

Critique on my first schematic?

To practise designing schematics (and possibly making it too), I have designed a simple AVR based blinker assuming it is already preprogrammed. The schematic is here: I've seen many Atmega/arduino ...
4
votes
2answers
21k views

Can you use an Arduino Uno as an ATmega328 programmer?

I don't have an Uno, but I was thinking of getting one and by the looks of it, you can remove the AVR microcontroller from the Arduino, right? It's just a DIP IC in a socket that can be pulled out, it ...
3
votes
1answer
2k views

Error while uploading hex file to AVR uC

I am trying to upload a hex file to an ATtiny85 from Ubuntu by running these commands: ...
10
votes
2answers
5k views

Do Atmega328 chips have pseudo-unique IDs?

I'd like a couple of Atmega328s to run the same program, but they're going to interface with each other and need unique IDs. Is there any such ID or serial number hard-coded on the chip?
8
votes
2answers
7k views

AVR interrupt service routine not executing as fast as expected (instruction overhead?)

I'm developing a small logic analyzer with 7 inputs. My target device is an ATmega168 with a 20MHz clock rate. To detect logic changes I use pin change interrupts. ...
7
votes
2answers
3k views

AVR debugwire in Linux

So, I have hooked up a ATtiny88, and am programming it with the Dragon AVR using ISP. I have also set up the build toolchain, using avrdude, and the gnu avr tools. Everything is working great. Now I ...
2
votes
1answer
625 views

Bitwise operation for UART, AVR

I'm trying to work on UART for AVR. After setting the baud rate registers UBRRnX, I'm trying to configure the UCSRnA register. I'm trying to set the 2nd bit, U2XO. Which is the right way to do it? <...
9
votes
1answer
4k views

Easily controlled color LCD for hobby projects?

I'm looking for some not too expensive, easy to control color graphics LCD I can use for various hobby projects, along with an AVR microcontroller or maybe an ARM in the future. The cheaper the better,...
3
votes
3answers
3k views

Serial Output returns wrong ASCII

I am using a FTDI cable and connected it with my mac. I can connect successfully with my serial terminal on my mac via the cable and can input text on my keyboard to be transmitted to the AVR. When ...
22
votes
3answers
29k views

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 ...
36
votes
10answers
17k views

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 ...
17
votes
3answers
19k views

Use AVR Watchdog like normal ISR

I'm trying to wrap my head around the watchdog timer on the ATTinyX5 series. So things I've read made it seem like you could use it for making the program do something specific ever N seconds but ...
10
votes
10answers
14k views

Microcontroller with Java API

My hardware team is planning to use an Atmel AVR 8-bit microcontroller for a future project. So far as I know, it must be programmed in C. I have found a JVM for AVR, though it is more limited than ...
23
votes
3answers
9k views

Jtag debugging AVR

Can anyone advise what hardware and software is required for debugging AVR in circuit.
18
votes
9answers
12k views

Ideal WiFi to Serial (or SPI) bridge?

What are some recommendations on an ideal WiFi to Serial bridge? My ideal qualities would be: Simple connectivity, SPI or Serial Reasonable fast speed, at least 1mbit/sec ideally (though probably ...
12
votes
8answers
24k views

Arduino With Assembly?

Since for my venture into Microprocessing I decided to go with Atmel AVR due to the vast resources available. And Arduino seems to has alot as well, not to mention their starter kits seem more "at my ...
10
votes
5answers
5k views

Arduino as AVR Programmer

Can you use the Arduino as an AVR programmer?
9
votes
5answers
4k views

Start off with embedded C with ATmega32 (ATmega AVR series)

I have a ATmega32 board laying around and I figure it would be perfect to start off with microcontrollers. I once did some babbling in embedded C (thats when I got this board) but the flow was stopped ...
17
votes
1answer
6k views

AVR 1.1V Internal ADC Reference Over-Voltage

If I use the internal 1.1V reference for the ADC, and my Analog input exceeds 1.1V, lets say 2.5V, is that harmful to my microcontroller? Or will ADC value simply clip (to 0x3FF) at 1.1V? For ...
15
votes
2answers
1k views

Why would the VCC/GND pins of an ATtiny26 not be aligned?

In the following pinout diagram for an ATtiny26 microcontroller, a 20-pin IC: The VCC/AVCC and GND pins aren't aligned. Surely it would be easier for PCB design to connect these by going straight ...
5
votes
3answers
5k views

Piezoelectric Sensor and the ADC

I would like to hook up a piezoelectric sensor to my ATmega8 microcontroller via its ADC. The reason being is that I would like to use the sensor as a force sensor. I noticed that the harder I press ...
8
votes
5answers
4k views

Firsthand experience with Linux AVR IDE

I am looking for some input into getting a good integrated development environment set up for AVR programming under Linux (Assembly and C). My studies gave me some limited practical experience with ...
5
votes
1answer
2k views

What does the 'A' trailing letter in Atmel's ATtiny devices mean?

I have both on stock: ATtiny861A-SU and ATtiny861-20SU. But I can not find out any difference between them except 'In-System Programmable via SPI Port' available for 'A' version. Could anyone tell ...
5
votes
2answers
4k views

How to store audio data for AVR project?

I see a lot of projects for AVR-based audio players that use an SD card to store the audio data. In fact, I am currently doing the very same thing on an Arduino and its Wave Shield, which has an SD ...
3
votes
1answer
2k views

Clearing Flag Bits By Writing 1

Most of the interface devices have various flag bits (that can also raise interrupts if that functionality is provided) used to check the status of the device/operation. Usually they are cleared by ...
9
votes
5answers
14k views

Best way to control 75 LEDs with Arduino

I need to control 25 groups of 3 LEDs or 25 RGB LEDs. Each group will be dismissed from the uC by up to 20 cm (about 8 inches). 20 cm is very safe assumption but I think it will be 10 cm or less. ...
7
votes
4answers
3k views

ATtiny2313 refuses to be programmed after setting CPU clock to 500kHz

The other day I was writing a program for an ATtiny2313. Once it worked I decided to test it at the various clock speeds that are available and programmed through setting the LFUSE as described on ...
7
votes
3answers
2k views

Arduino Bootloader

If I upgrade my arduino from the ATMega 168 to ATMega 328 will I be able to use the ATMega 168 like a stock chip from the factory or will the bootloader prohibit this? In other words, will I be able ...
5
votes
2answers
3k views

Does the internal 8Mhz oscillator in an ATTINY run even if no clocks are connected to it?

If I set up the fuses on an ATTINY so that the system clock uses the internal 128Khz oscillator (sometimes called the "Watchdog oscillator"), does the internal 8Mhz oscillator still run? It does not ...
4
votes
2answers
1k views

ADC calibration in ATTiny88

I'm writing an embedded app for ATtiny88 - one of its task is to measure voltages of serial connected two 12 V car batteries. The microcontroller is powered from around 4.5-5 V (LM317), measured ...
3
votes
1answer
1k views

Load capacitance for a microcontroller crystal?

I know there are lots of similar questions on here, but I've read many of them and am still a little confused. I'm a student making a board similar to the Arduino Pro Micro, using a Atmega32U4 ...
3
votes
2answers
6k views

Use PWM and ISR at same time on AVR

Is it possible to use AVR PWM outputs and ISR interrupts at the same time? I've got a project I'm trying to do on an ATMega328P and I need 3 PWM outputs but ALSO need to be able to use ISR interrupts ...
2
votes
3answers
2k views

What does “Wait State” access mean on a MCU's datasheet and how does it affect me?

I'm considering using an AT32UC3B in my project (the Super OSD Pro version.) However, something about the datasheet has me worried. Page 31 0 Wait State Access at up to 30 MHz in Worst Case ...
1
vote
1answer
679 views

chip select on one to one spi connection

I connect an imx233 (master) and atmega168a (slave) through SPI. I am trying to debug the communication. I have problem with imx233's chip select, therefore I connect CS of the AVR onto the ground. ...
1
vote
4answers
6k views

AVR programmer with serial to USB converter

I am struggling with making a usb programmer for Atmega. I couldn't get my hands on a proper FT232L or something like that, but I did manage to find a serial to usb converter like this. This gets ...
0
votes
2answers
2k views

How to use a Raspberry Pi Pin(3.3V) to reset a ATMEGA328(5V)

I have a ATMEGA328(AVR) connected to a Raspberry Pi(RPI) via serial using a level shifter. The AVR has the Arduino Bootloader installed and I would like to program it via serial. What would be the ...