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

1
vote
4answers
81 views

Read AVR watchdog timer

AVR Watchdog timers. Is there any way to read the watchdog timer from within the code? Intended use case: To get an approximate idea (very rough, +/- 1sec) of how long it has been since the ...
0
votes
2answers
31 views

What is default Clock Frequency for Atmega8

I was upto use the UART of my Atmega8 but when i looked at the formula for UBBR, it asks F_CPU(frequency). I have made my own board and havent connected any external clock so what is the frequency my ...
0
votes
0answers
22 views

Optimizing an Arduino code [migrated]

I am working on project and using Arduino Pro Mini (Atmega328p running on 2xAA) to measure the time to charge a capacitor (when the volt level is high). This is the code I used while testing: ...
1
vote
1answer
30 views

avr signature doesn't match, flash address 0x0000 wrong

I'm new to electronics. I've bought an ATmega32 (a link to docs) and I'm trying to light up a single LED. I have managed to do it a few times, but then I tried to change the hookup wires to a single ...
0
votes
0answers
9 views

Olimex AVRISP MK II with avrdude on OSX

Is it possible to use the Olimex AVRISP MKII with avrdude on OSX? I have been trying to get this working for a while now with no luck. I updated the firmware on the programmer as instructed for linux ...
4
votes
1answer
95 views

AVR: How optimize cycle-counted ISR to portable code, using inline asm

I'm trying to optimize my RX and TX interrupts to meet maximum execution time of 25 cycles while interrupts are disabled. So far, I have found that code is optimized enough, but pushing and popping ...
0
votes
0answers
5 views

How to program a CLK signal and its inverse with Arduino/AVR [migrated]

Is it possible to simultaneously output a clock signal and it's inverse using the timer register(s)? I'm using the following code in arduino to output a 1mHz signal on OC1A: ...
2
votes
0answers
60 views

HD44780 LCD with Atmega8. Only Cursor, no characters

I am trying for hours but i can only see cursor blinking and no characters. but If i write say 'ABC' then cursor will blink at 4th index but i cannot see ABC. I am using atmega8 with LCD in 8bit mode, ...
2
votes
3answers
52 views

Why does flash size depend on target hardware?

I've been writing an application for AVR microcontrollers. I intended to burn it on ATtiny13A (because it's cheap, and I wouldn't use complex functions anyway), but at that time I had only ATmega328P ...
0
votes
1answer
25 views

Connecting AVRISP MKII programmer

I need to connect an AVRISP MkII microcontroller programmer to my ATTiny2313 microcontroller in order to program it. I've never done this before and don't want to damage the programmer, so I have a ...
0
votes
2answers
46 views

Is UART necessary to send AT-commands to Bluetooth module?

I'm looking to alert a connected device over Bluetooth when an accelerometer detects motion. I'm thinking of using the HM-10 Bluetooth module and an ATtiny for controlling the accelerometer. The doc ...
0
votes
2answers
46 views

Cannot Connect AVR USB ISP 2.0

After searching for a about 10 hours, this is my last hope. I've made my own development board, with Atmega8. The program is also ready. I bought Atmel USB ISP 10pin from a local shop to transfer ...
1
vote
1answer
32 views

Receiving a string via Xbee in API Mode

In my earlier question at this link , i asked a question on how to use minicom in linux to communicate between two Xbee's in API mode and got the answer. While i ...
1
vote
1answer
50 views

Which ground (digital or analog) measurement components should be connected to?

Good day, I want to measure current and voltage of switching power supply that is on board together with ATMEL AT32UC3L microcontroller. I think I understand how to measure - using resistor divider ...
0
votes
4answers
105 views

What is the purpose of a pull-up resistor in a microcontroller?

I'm reading about the AVR microcontroller. In a chapter on I/O ports I've stumbled accross a concept that I have trouble understanding: the pull-up resistor. Here is a quote from the textbook: ...
1
vote
1answer
38 views

How to communicate with 2 devices with 1 UART MCU in AVR

I am currently looking to integrate GSM SIM900 and GPS Module with Atmega32. As atmega32 has ...
0
votes
1answer
45 views

Programming an ATmega32u4 through USB

I'm designing my first circuit with an ATmega 32u4 processor. Since I read about the BOOTRST and HWBE fuses I'm confused about the programming of the chip. If I use a brand new, untouched processor ...
1
vote
1answer
37 views

Communicating between 2 Xbee in APi mode using Minicom

I am working on Xbee in API mode and i am writing a small program in C to receive API frames and process them, but to start with this, i simply wanted to check that how does these frames look like and ...
0
votes
0answers
31 views

nrf24l01+ transmit wrong values, solution and question

I have 2 AtMega328p with NRF, one is tx, one is rx. I disabled auto ACK, CRC, IRQ pin, and Dynamic payload. Set the PA to MAX (0dbm), payload to 4 Bytes, Channel to 0x02, and the data rate to 1MBPS. ...
0
votes
0answers
29 views

AT90USB646 code 43 error

I needed adc for my project so i built this : It was programmed correctly but when I connect the USB to the PC to use Codevision terminal nothing happens and there is Code 43 usb unrecognised ...
2
votes
1answer
53 views

AVR and MOSFET gate resistor

I am driving a MOSFET with AVR using PWM for controlling a motor. I have a 4K7 pull-up resistor on the gate. My question is, do I need a resistor in between the AVR pin and the gate? (The mosfet is ...
0
votes
2answers
49 views

Atmega 16 - Timer0 with interrupt

In this code the one LED is glowing at one pin PC0 with flash every 50 ms. It has XTAL of 16 MHz. With CPU frequency 16 MHz, even a maximum delay of 16.384 ms can be achieved using a 1024 prescaler. ...
2
votes
1answer
37 views

TWINT flag never goes up

I want to establish I2C connection between two atmega2560. First one is working as a master, and second as slave. Master works on a transmitter mode, and Slave works as receiver. On Master side: ...
1
vote
1answer
98 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? ...
0
votes
1answer
36 views

Error interfacing GSM with Atmega32 using UART Interrupt?

I am interfacing GSM with atmega32 using uart interrupts. I am using an external interrupt which is fired when a user press a switch and uart receive interrupt to receive the response of GSM. CODE: ...
2
votes
1answer
53 views

Error interfacing GSM sim900 with atmega32

Hi all I am trying to interface GSM SIM900 with atmega32. I have a written a code in which if a user press a push button, a call will be made to a pre defined number. If we want to change the pre ...
-4
votes
0answers
30 views

Need to know about apc ups AVR [migrated]

Due to high voltage my mac mini broke down. I am looking for cheap option and found this apc ups BX600CI. I read its specification which have AVR. I want to know what doest this mean. Its Input ...
0
votes
0answers
20 views

AVR Dragon - 2V measured on Reset pin on ISP header

I was troubleshooting a ATtiny841 chip using debugWire yesterday, that is until my AVR Dragon stopped working. I did not smell burnt plastic, and I can still the Target Voltage from AVR Studio ...
0
votes
1answer
86 views

ATTiny85 Not responding to anything (Arduino UNO as programmer)

I'm trying to program 8 ATTiny85's I purchased from ebay but I can't seem to get any response from them. I have tried following several guides and even tried to use High Voltage Serial Programming ...
1
vote
2answers
96 views

AVR to drive 12V 1A motor

I have AVR that needs to drive 12V 1A motor. I always used NPN BJTs (2N2222), but reading the datasheet says the MAX is 1A (which means I cannot use it here). Instead, I willing to use MOSFET. I have ...
1
vote
1answer
164 views

AVR switch best practice

After reading a lot of posts (here and on the web), I am a bit confused. All I want to do is to get the best practice of push button connection to AVR. I have 2 "sections" to my question. the first ...
0
votes
1answer
134 views

Error communicating with GSM SIM900 with AVR.?

I am trying to interface GSM SIM900 with AVR Controller. Till now I have done programming which transmit the command ATD and it makes a call to my cell. GSM response to this command by sending OK. I ...
0
votes
1answer
37 views

What is a good strategy to read many button inputs while still doing USB?

I am trying to design a USB joystick with many different buttons. The board I am using right now has an ATmega32U4, USB port, and 16 I/O pins. I am using LUFA for a USB stack. I know that I can get ...
0
votes
1answer
52 views

Check if bucket has water left

I want to build starter and simple auto self-watering system. I need the pump to take the water from a bucket, which means I need to check the water level on it and alert if too low. I want to do ...
2
votes
2answers
78 views

Not getting correct values in I2C interfacing in Atmega

I'm very new to the concept of I2C and I've been having some problems interfacing I2C between 2 Atmega32(s). I have one Atmega32 as a Master to which an LCD screen is connected and another I2C as a ...
0
votes
1answer
67 views

Atmega328P 32.768KHz Crystal Issue

I am having an issue with 32.768khz crystal connected to an Atmega328P (which I am using as an external source to timer2 in asynchronous mode to wake up the Atmega from sleep every second). On a ...
0
votes
0answers
69 views

reverse engineering firmware

I have a HEX file with a firmware for Attiny45. What I want to do is to extract some kind of formula that is coded inside it. I have done some research (mostly to find out that "it is not possible", ...
1
vote
1answer
43 views

AVR: Interrupt build error

I am trying to learn how to use interrupts for a project using an Attiny85. I have written a simple program from what I have learned from tutorials. However when I try to build the program in Atmel ...
0
votes
2answers
53 views

would using the reference voltage of an ADC as a VOLTAGE SOURCE affect my ADC or the stability of the circuit?

I am using an Arduino to capture an AC signal. However, the application is sensitive and needs a high resolution, I decided to use the internal 1.1 Volt as a voltage reference for the ADC. In the ...
1
vote
0answers
46 views

High voltage and low voltage sensing via the same pin

I am trying to put together a high-voltage programmer for AVR, which involves applying 12V to the target's nRESET in an otherwise 5V system. However, I also want to use nRESET for presence sensing ...
3
votes
2answers
136 views

Race condition in AVR timers

I'm trying to implement a global timer, so that I can call time_us() anywhere in program and the function will return microseconds since program start. I've done this using TIMER2 (8-bit clock) and ...
0
votes
1answer
66 views

WS2812B with ATMega8 and light_ws2812 Libray

I have connected four WS2812B modules I got from eBay to my AtMega8 and tried to use the light_ws2812 libray to controll them. I connected the wire used for communication to the PC5 Pin on my ATMega ...
1
vote
1answer
69 views

AVR sending message via UART

I want to send char though Atmega2560 to the xbee coordinator(AT mode), and router(which is connected to the computer) should receive that char. I can correctly receive messages from router -> ...
0
votes
0answers
22 views

Question about CG\CG2 Xbox 360 Controllers and Trigger Pulls

I'm working on a basic mod chip, but not exactly for gaming; more for robotics. I'm using the new common ground (CG\CG2) controllers. I'd like to make my chip as much like the XMOD chip as possible ...
0
votes
2answers
56 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 ...
1
vote
1answer
102 views

Can't get AVR pin change interrupt to work

I'm trying to get a pin change interrupt on an Attiny2313 to work but i'm stuck, the interrupt is not triggering. I'm using the following code in main(): ...
0
votes
0answers
70 views

Communication between two XBee S2 in AT mode

I want to establish a simple wireless link between my two AVR microcontroller boards; (one is ATmega8 and second is ATmega16), using XBee series 2 modules. I simply want to send some data from one ...
0
votes
4answers
78 views

automatic bootloader without PC software [closed]

I want to design a bootloader in AVR ATMEGA16 that when we reset the AVR, it receive hex file from some PC by serial port without run a program on PC for example when we reset the AVR, it load .hex ...
1
vote
1answer
38 views

AVR Sleep Mode Clarification

I have been learning about the AVR sleep modes as I would like to start using them in my future projects. I think I have understood the most of it except some specific details below Under Power ...
0
votes
1answer
50 views

How Can i Protect my Oscilloscope from high voltages?

I made an oscilloscope with AT90USB series(activated ADC in micro and send data to my own program in PC via USB).I dont need more than 0-5v but you can never tell.I know I can mislead higher voltages ...