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

learn more… | top users | synonyms

0
votes
2answers
36 views

Atmega128 ISP programming, unable to read device ID

I am trying to program a Atmega128. ISP programming First I used AVR dragon, I can read the target voltage, but when I go to read the device signature, warning comes Unable to enter programming ...
0
votes
1answer
30 views

Software To Simulate Any AVR MCU Program on Linux/Ubuntu [on hold]

is there any software to simulate an AVR assembly or c++ program on linux/ubuntu?
0
votes
0answers
21 views

Watchdog timer problem on Atmega 1281

I am using a modified Arduino board: Gizduino X with Atmega 1281 MCU chip on-board. The application is uploaded to MCU using Arduino IDE programmer. I attempted to use the Watchdog timer reset feature ...
0
votes
0answers
44 views

Timer causes UART problem

I have a problem, found on both ATMEGA1284P and ATMEGA2560. I have set a 16-bit timer in CTC (tried both Timer1 and Timer5) to give an interrupt every 1ms so I can increment a 32-bit volatile time ...
-1
votes
0answers
36 views

AVR Studio 7 with WinAVR help required

From last few years i am using WinAVR with VMLab Simulation software, everything was OK with them, as have successfully created different small, medium and large scale projects. I feel difficulty in ...
0
votes
0answers
30 views

Problem when programming Atmel ATmega16U4 using USB

I'm having a problem when I'm programming the ATmega16U4 through USB port. I designed the PCB, but I will assume the hardware connections are good. It is because when I connect the chip to the ...
0
votes
0answers
19 views

Atmel ICE SAM connector pinout does not reflect the real pinout

Maybe I am just too slow, but I can't understand exactly how do you connect an ATMEL-ICE (6 pin connector, not the 10 pin) to a chip. I am using a SAMD21G (http://www.atmel.com/Images/Atmel-42181-SAM-...
1
vote
0answers
106 views

PCINT0 interrupt on attiny

I'm started working with AVRs few days ago. Started with assembler and simulating in Proteus. My current goal is to enable Pin Change interrupt on PCINT0, which is PB0 on my attiny13. Right now I'm ...
1
vote
2answers
315 views

Wires from car battery to solenoid catching fire after connecting a second solenoid

I have two solenoids connected to my AVR and car battery: simulate this circuit – Schematic created using CircuitLab But when I start switching them the circuit burns up (literally there ...
4
votes
3answers
313 views

ATmega - Why is the prescaler factory defaulted to 8?

Why do ATmega (e.g. 328P or 644P) have CKDIV8 (or CLKPS = 0011) factory programmed along with a default internal 8 MHz ...
0
votes
3answers
270 views

Blinking LED on ATMEGA168. Error rc=-1. AVRDUDE

I apologise in advance. This is my first project. I keep getting this error ...
0
votes
2answers
133 views

Modifiying variable inside of Interrupt vector. AVR

My question is again about modifying variables inside the ISR. If the variable used only inside of ISR, I don't have to declare it as volatile, right? After some researching, I figured out that ...
1
vote
1answer
32 views

Memory architecture and instruction storage - Naimi: AVR Microcontroller

LDI R16, 0x25 --> E 2 0 5 --> 1110 0010 0000 0101 Apparently, in AVR, the code and data are stored separately and each area (code, data area) is accessed by a unique bus. Now since the Program ...
0
votes
3answers
38 views

Load/Store architecture

In RISC vs CISC, the load/store architecture: Load memory data into CPU register Compute Store result in memory In CISC, 1,2,3 is wrapped in a single instruction. In RISC 1,2,3 are separate ...
0
votes
2answers
38 views

Configuring events on Xmega

Is it necessary to enable the interrupt for a given event source in order for the event to fire, or is it only necessary to select the source from the event system? To clarify, I am asking about the ...
1
vote
1answer
19 views

Event triggered one shot on XmegaA4U

I am trying to implement a phase control circuit for driving a TRIAC/SCR. I plan to use an xmegaA4U series microcontroller. I already know that I can route the AC signal through a voltage divider and ...
3
votes
1answer
57 views

Sensor supplied by MCU - sink or source what is most energy efficient?

I'm building a tiny system for fridge door monitoring. AVR (Attiny13A) is used which is connected to a linear hall sensor OH49E, the complete system is battery powered and I'm trying to minimize power ...
-2
votes
4answers
179 views

Basic Transistor/MCU Question [closed]

Let's say I have 4 AVR MCU's All hooked up to VCC. And let's say they're all connected to ground through an NPN transistor or NMOSFet. Can I use that transistor to switch the MCUs on\off? I'm pretty ...
1
vote
2answers
172 views

How to make a circuit that generates 50mA current at +1.8v within 10ns rise time?

I am using Atmega328 MCU to control a SRAM IC and it is required to power up the IC using a source that can deliver 50mA current at +1.8v within 10ns rise time without any voltage drop. unfortunately ...
0
votes
1answer
37 views

AVR MCU running @ 32.7Khz Low speed LED multiplexing problem interrupt

Works fine with internal 8mhz, but when change to 32.7Khz, the multiplexing led display is not working properly (it's flashing very randomly). is this the limit of low clock speed or is there a ...
0
votes
1answer
46 views

LED display Atmega - Running out of output pins

Seems like I am running out of I/O pins. I only have 6x 8bits pins (need 8 with multiplexing), and I want to power 5x 8 by 8 and 2x 7-seg displays. I don't want to use another ic. so is there a way?
0
votes
1answer
42 views

Atmega32 PWM on all four PWM pins

I am trying to control LEDs brightness using PWM on the Atmega32. I have one LED connected to each of the 4 PWM pins (OC0, OC1A, OC1B, and OC2). Using the code below, all of the LEDs are functioning ...
0
votes
0answers
46 views

Using the interrupts of ATmega16

I am using CodeVisionAVR and I'm trying to write an ISR which should do a specific job for me. the problem is that first time that the ISR is called, it works properly but for next time it does not. ...
0
votes
0answers
70 views

AVR interrupt setup seems to stop program execution

On ATMEGA168PA I have problems with interrupt-driven character reception over UART. When I include the line setup_interrupt() it seems that program execution stops ...
-1
votes
0answers
21 views

Detect shorts in wire bundle with ATmega8515

I'm using AVR ATmega8515. My IDE is Eclipse. It's similiar to Remember the iteration when a condition was met but I want to test multiple ports in negative logic at once. I'm trying to make short ...
0
votes
1answer
39 views

AYTINYx4 - execute other code during analog conversion

I am using an ATTINY44 in my current project. As I need to do some time sensitive switching I would like to avoid any unnecessary delay. To control another device (not time sensitive) I need to read ...
0
votes
1answer
50 views

1200 Baud Rate UART at a 9kHz clock speed [closed]

I just did the math and with the internal clock of the ATMega328. The lowest clock frequency that you could use to have a 1200 Baud rate is 9.6kHz. Unfortunately I need to be under 9kHz. Is there ...
0
votes
1answer
79 views

Atmega328p: why button input is read as 0 when pressed?

I'd like to turn on the board's LED (PB5) when I press its button (PB7). ...
1
vote
1answer
38 views

Can I use ATtiny SPI and still be able to do in-system programming?

I'm building a cost sensitive device that requires SPI and a single analogue comparator. Looking at the spec, ATtiny20 or ATtiny48 would fit the bill. The requirement is to be able to program it in ...
0
votes
1answer
37 views

Rise/Fall time of GP Pins

Are rise/fall times typically affected by the clock speed. That is if I have a AVR at 16 MHz will it have a different rise/fall time than the same AVR at 32kHz?
-1
votes
1answer
83 views

AVR ATmega32 UART Not Reciving

I'm trying simple UART transaction functions for ATmega32. I can send the bytes but not receiving anything. I am using polled UART receive. ...
1
vote
2answers
69 views

FCC Low Oscilation

I have heard that if a circuit is operating at less then 1.2 MHz it does not need FCC certification. Does an ATMega328 with with a 1Mhz External crystal, and the internal clock not used qualify for ...
0
votes
0answers
17 views

usbasp erasing fuses

I'm trying for the first time to program an attiny45 with a USBasp and avrdude. After about an hour of frustration, i found that when the programmer erases the flash, it also erases the fuses. So i ...
0
votes
1answer
21 views

AVRISP. How to choose SPI frequency?

Yes, yes, I know that it must be between 1 and 4 clock cycles of a target device. But... We don't know it if clock is provided by internal rc generator or external quartz. So is there any possible way ...
2
votes
3answers
106 views

Some characters are not transmitted correctly from mega32 to ESP8266

i recently bought an ESP-01 for a simple wi-fi project reading the temeprature from a website . First i wired the ESP-01 directly on the TTL converter (cp2102) to read the temperature and everything ...
0
votes
1answer
60 views

soft starter code for avr

I need to control 2 DC motors (Maxon RE40) using an AVR (atmega328) through pwm. I was wondering what is the right way to approach the situation. Should I increment the duty-cycle at a specific time ...
0
votes
2answers
63 views

atmega328p GPIO with 3.3V regulator reads 2.5V at pin when High

I am driving the enable on a boost regulator and the boost is not turning on. When I checked the voltage on the enable, it was 2.5V. The boost worked on an identical set of boards I tried before this (...
0
votes
0answers
53 views

JTAG is not working with Atmega32a using Atmel-Ice

I am using Atmel studio 7 and Atmel-Ice to program atmega32a on a board that I have made and using 16MHZ external crystal. When connecting the board to Atmel-Ice using ISP it works fine and I can ...
0
votes
1answer
26 views

ATmega32A _delay_ms after IO calls

I am loading the following code into ATmega32A PU 1535 to flash the LED on pin 40, PORTA 0: ...
-1
votes
1answer
58 views

MIDI Controller with an ATmega328p [closed]

Could one detect presses and releases from a 11 by 6 matrixed keyboard and send data from USART with just an ATmega328p microcontroller? I want to send MIDI notes from an old 61 key Yamaha keyboard ...
0
votes
1answer
74 views

AVR only runs when connected to ISP

I have a circuit set up as in the following diagram. There are 4 vertical power rails, the left-most 3 are supplied with 15v, and the right most 1 is supplied with 5v. The purpose of the circuit is to ...
1
vote
1answer
114 views

UART in NON INTERRUPT or INTERRUPT mode while using VUSB

I'm working UART data transfer from one ATmega8 to other while the receiver runs VUSB acting as HID Mouse to the PC. UART though init with 9600 , later is set to max speed - > UBRR = 0; Problems : ...
0
votes
2answers
129 views

Moving from assembly to C [closed]

About four years ago i stumbled upon some electronics projects on the internet and ever since i fell in love with it. So I started at basic circuits then moved to analog circuits and spent very little ...
10
votes
6answers
1k views

What is the purpose of a microcontroller bootloader? [duplicate]

From my understanding, for a common microcontroller (e.g. AVR, PIC), there are generally two methods of programming its flash memory. Using a programmer: In-Circuit Serial Programming (or some ...
0
votes
0answers
33 views

DC Variable power supply fluctuating? (ATTiny85)

I hooked up an ATTiny85 to my computer using an avrisp programmer, with a red LED on PB3, a 4.7k ohm pull-up resistor on reset, and a 180 ohm resistor in series with the LED on pin 3. I was able to ...
0
votes
2answers
79 views

SD card Sector size

I am working with SD card using AVR microcontroller. My question is, can we change the sector size of SD cards or it is fixed 512 bytes in SD card's case? What things should be considered if I want to ...
0
votes
4answers
112 views

AVR UART synchronization problem

I'm learning embedded programming (I'm not an Electrical Engineer). Sorry if this is not the right place or I'm asking this question incorrectly, but I had a very tough time trying to figure out a ...
0
votes
2answers
41 views

clock frequency confusion

I am using an atmega16 micro controller with a 12MHz external crystal oscillator. But I came to know that the internal clock frequency is 1MHz I need to calculate UBRR value for serial communication. ...
0
votes
1answer
44 views

AVR Frequency measurement accuracy

I need to measure the switching frequency of an open collector output. The waveform will be square shaped and the frequency range is specified as 0 to 5kHz. First of all I don't want to count pulses ...
1
vote
1answer
42 views

ATtiny26l won't work without programmer

I'm running a simple program on an ATtiny26l but if i disconnect my AVRISP MK2 programmer it stops working completely. I'm supplying 5.4v to both VCC and AVCC pins (chcecked voltage).If i reconnect ...