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
1answer
28 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
43 views

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

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
69 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
26 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
35 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
77 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
68 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
13 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
19 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
88 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
50 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
45 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
0answers
21 views

Array write/read with atmega 8 with help of USART

I have been stuck on a problem for a week, so I need to ask for help. I want to receive an array by USART and write that array in EEPROM(internal/external) and same read that value or array and ...
-3
votes
0answers
46 views

How is programming done on a NXP MC9S08? [duplicate]

I am wondering how a NXP 8-bit microcontroller unit is programmed? Is there any kind of programming unit such as an AVR ISP MKII (for atmel) or a ST-Link (for STM)? Edit: I would also like to know ...
0
votes
1answer
25 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
55 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
65 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
105 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
127 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
63 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
96 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
33 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
42 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
40 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 ...
1
vote
0answers
86 views

What is STM8 hardware and software interrupt latency?

Just have a first look over the STM8 lineup to compare its performance to AVR which is well know for me now. One of my the big complain to AVR was the slow reaction to interrupts especially in C ...
1
vote
1answer
61 views

ATmega48PA: can not run PWM on OC0A and OC2A pins

I have some troubles trying to run Fast PWM on OC0A and OC2A pins. The code is the following: ...
0
votes
0answers
38 views

supply adc pin of AVR with higher than recommended max voltage ac

The set up is a differential signal passed into an opamp with +/- 5V supply, then biased to +2.5V, so it's possible that max voltage could dip below 0V and above 5V for super short intervals. I've ...
-2
votes
4answers
100 views

Button debouncing not working [closed]

I want to toggle a led with a push button and an ATMega16a but for some reason the toggle behavior seems a bit randomly. ...
5
votes
4answers
1k views

Why do people use (1 << PA0) when setting port?

In AVR Tutorials I often see: DDRA |= (1 << PA0); PORTA |= (1 << PA0); used instead of: ...
0
votes
1answer
44 views

Simple Question: Connecting Mac with 3.3V FTDI USB Cable to 5V Breadboard

I'd like to connect my iMac to a breadboard with a 3.3V TTL FTDI USB cable. The breadboard has an Atmega328 AVR microcontroller powered by a 5V regulated power supply. Sorry, if this is a naive ...
0
votes
1answer
80 views

Will 3.3v to 5v level converter work with USB data lines?

I'm trying to design a low-speed USB device based on ATmega16a. That chip doesn't have any USB interface, but it is possible to use bit-banging and there are even ready-made libraries to do so, like ...
0
votes
1answer
53 views

Atmega8 cbi/sbi Timing Issue

I seem to be having a weird issue regarding cbi/sbi instructions on Atmega8-16AU. I have it connected to an external 16Mhz crystal. I am able to verify that it is running at 16Mhz by using ...
1
vote
3answers
62 views

Updating Multiple Ports on 8bit AVR in Single Cycle

On the 8bit Atmel AVR MCUS (specifically mega and xmega series), is it possible to simultaneously modify multiple ports in a single instruction cycle? For example, I have a 512kB RAM chip which ...
0
votes
1answer
104 views

avr-gdb doesn't stop at breakpoint

I'm trying to debug code on an 8 bit AVR microcontroller (Atmega328P) via debugWIRE using AVaRICE, avr-gdb and the JTAGICEmkII debugger. I'm doing the following steps: Compile the code with ...
0
votes
3answers
57 views

AVR studio 6.2 flash atxmega32e5 signature issue

I am trying to flash my AVR ATXMega32E5 with Atmel-ICE thanks to SPI. The problem is that from AVR Studio Device Programming it can read the Target Voltage but not the Device Signature. What it ...
2
votes
1answer
66 views

AVR PWM output delay before start

I'm using an ATtiny85 to generate a PWM output (using Timer0 in OCR mode), and this PWM output is being switched on and off at regular intervals. I am finding that when switching on the PWM output, ...
0
votes
0answers
33 views

Bluetooth communication issue avr-pc

In the last few days I was messing around with avr <-> pc communication. Thanks to the help that I received here I managed to establish a good connection using pl2303 ttl-to-usb converter. Now, ...
1
vote
2answers
86 views

UART communication issue

I am trying to send something from an atmega to my pc. The setup is: Ubuntu 14.04, atmega644P-20PU, USBASP v2, TTL-to-USB pl2303 Firstly I tried to write the code in C and used this code and then ...
1
vote
0answers
28 views

How to increase the boot timeout to send commands to flash hex in a AVR Atmega2560 controller?

I am working with the Peter Fleury boot loader STK500v2. My idea to implement is boot loading via a bluetooth module at UART1. Now I have modified the existing code to make boot loading possible via a ...
0
votes
2answers
209 views

Difference and compatibility between AVR xxxA and xxx/xxxV series [duplicate]

This is kind of two questions(difference & compatibility), but since an extensive answer to the latter will probably include an answer to the former, I think it's okay. Anyway, on to the ...
0
votes
1answer
92 views

Sensor not working

I have the following code that is supposed to turn on a led (Port D, pin 5) whenever a digital distance sensor is triggered. Double checked the pinout and the sensor is working. Is there a problem in ...
3
votes
1answer
61 views

Atmel Studio assembler: how do I define a port pin?

Let's say I need to test a port pin like this: sbic PIND,2 This should work, but in C I would definitely made a ...
3
votes
1answer
64 views

AVR external interrupt triggering by the falling edge: for how long should I keep signal low to guarantee triggering?

The question header appeared to bee too long. I'm sorry for that. So I have a schematic generating a short LOW on INT0 pin of ATmega48PA. From the simulation I figured out that the LOW level will be ...
0
votes
1answer
159 views

What is needed to store readable/writable data to flash/eeprom [closed]

I am wanting to add some readable/writeable memory to my ATmega8/attiny project where I can store data, recall the stored data, then overwrite the stored data. The stored data must be able to be ...
0
votes
2answers
96 views

AVR debugging on Linux with Eclipse and AVaRICE

I'd really like to be able to debug on i.e. an Atmega328p on Linux with Eclipse as described on avr-eclipse.sourceforge.net After quite some research, it seems an JTAGICE mkII should work fine with ...
1
vote
3answers
117 views

How to make a zeros and ones counter?

I'm trying to write a zeros and ones counter in assembly with the AVR ATmega328P. To choose between the ones and zeros, I have a switch in PC5. For the input there are 8 switches connected to PORTB ...
0
votes
1answer
39 views

Convert low voltage accelerometer to Wake ATTiny Open Source Binary Watch, activate on wrist motion

I'm working on building a binary watch similar to njeer's binary watch featured on hackaday I am planning on using a cr2032 3.0V 190mAh battery. So in order for this to run for any length of time ...