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
0answers
51 views

SPI always returns null while reading

We need some help in SPI protocol. We've been using an AVR microcontroller ATMega324PA (DIP) and an ADXL344 accelerometer (QFN Breakout). Both chip operates at 1.8V and supports I2C & SPI. Lately ...
1
vote
1answer
26 views

Is it possible to power target microcontroller from AVRISP mkII using Atmel Studio

I'm using the Atmel Studio IDE and a AVRISP mkII to program microcontrollers. I've always powered the microcontrollers to be programmed with an external power supply but I was wondering if it is ...
1
vote
4answers
267 views

Rotate a 7-segment display in firmware

I have a board with a 7-segment display controlled by an AVR. I need to rotate the display's characters in the firmware, so that the display is read correctly when physically rotated 180 degrees. ...
2
votes
2answers
62 views

AVR microcontrollers, who initilizes assembly `data` segment and what is the purpose to have this directive?

I am new to assembly and microcontrollers and am trying to figure out how they work. Now, I have read a lot how in assembly text and ...
0
votes
1answer
51 views

How to use an external ADC with an AVR ATmega [closed]

I have got the ATmega162 and the ADC0844 and wired it up like this: simulate this circuit – Schematic created using CircuitLab because the wiring diagram is hard to read here the ...
2
votes
1answer
63 views

AVR external crystal not working with UART

So I have an ATmega328P with a 14.7456MHz external crystal, full-swing settings, and I'm trying to talk to my mac via UART and an FTDI friend-type device. If I connect AVR Tx to AVR Rx, then all ...
0
votes
1answer
85 views

Daisy Chaining ADC Sensors

I'm creating a grid of 200+ pressure sensors and need a clean way to get their values back to the master controller without a mess of wires. To me it seems like daisy chaining all the sensors ...
4
votes
2answers
235 views

Sink or source from AVR

I've been (re)learning microcontroller programming using AVR ATinys (13/45/85). One reference on digital outputs said that I should sink outputs, but nearly all of the circuit examples I've seen ...
2
votes
0answers
48 views

32-bit unsigned binary integer to 8-bit BCD in AVR ASM for ATtiny. How to make it more efficient?

I wrote a program in AVR ASM for converting 32-bit unsigned binary numbers to 8 digit ...
0
votes
0answers
36 views

I2C slave is not acknowledging for SLA+W but values can be read from/write to registers

We got a wierd problem in a I2C device. We've been trying to solve the issue for more than a week now. This post is about ADXL344 Digital Accelerometer from Analog devices. We made three prototype ...
0
votes
1answer
71 views

ATmega 328P SMD version

Currently I am using the normal ATmega328P chip with my barebone Arduino I have made. I am planning to switch it with an SMD version of ATmega328P, since it's smaller in size it will consume less ...
0
votes
1answer
30 views

Measuring pulse length with ICP

I am trying to measure pulse length, with ICP (input capture pin) on Atmega8, coming from this circuit:. PINB0 is ICP pin on AVR. This is (most of) the code: ...
2
votes
1answer
87 views

AVR long int calculation error

I'm having some trouble with a function( void CheckSum() ) for a checksum calculation. The problem is, that when I call up that function inside another function called ICMP_Frame(), it works fine. ...
1
vote
1answer
95 views

AVR Input not reading correct value

I feel like this is a true beginners problem, but I fail to see what I am doing wrong here: I have a SIP switch connected to port A of an Atmega32 and I cannot read correct values from the port. Here ...
0
votes
2answers
28 views

Low power ripple pulse counter

I'm trying to find a ripple/pulse/edge counter chip that can record rising edges from a wind anemometer while my AVR sleeps. The signal is typically 0-50 Hz. I want to read it every 10 minutes, so it ...
0
votes
0answers
37 views

AVR TWI/I2C Not Responding

I use Twi module of AVR Atmega168 to talk to DS1307. ...
0
votes
1answer
38 views

Does the Atmel-ICE Debugger work on ATtiny MCUs?

I've looked on the interwebtubes and could not find out if the Atmel-ICE debugger works with ATtiny MCUs. In theory, since the debugger supports debugWire and SPI modes, it should, but the official ...
0
votes
0answers
29 views

AVR324PA controller not executing flash code

We got a simple circuit that has a ATMega324PA controller. We use AVR-ISP MKII programmer to program the controller. Both the controller and programmer is supplied with the target voltage 1.8V. ...
-1
votes
0answers
51 views

Reserved address in the MCUs datasheets [duplicate]

Why some addresses and bits of registers of microcontrollers are reserved? What is the difference between the reserved and unused addresses? Does the reserving affect cost of design and production of ...
0
votes
1answer
97 views

Reduce power noise on AVR

I'm working on an AVR computer, everything works fine, except when I tap any ground point with my finger (there are a lot of them exposed), the MCU (an ATMEGA328) hangs for a brief second. I have a ...
0
votes
2answers
72 views

Custom Atmega32u4 board first boot

I've built a custom board with an Atmega32u4, like the Arduino Pro Micro from Sparkfun. The circuit seems ok, but when I plug the board to a pc, the usb device isn't recognize (doesn't even pop the ...
2
votes
1answer
87 views

Run barebone arduino on 3Volts battery

i have finished building my barebone arduino..i want to run the barebone chip with 3V battery i.e double AA 1.5 x 2= 3V..the reason i am persisting using 3V Vcc is because in our project we need to ...
1
vote
1answer
60 views

ATmega XTAL input capacitance and crystal load capacitance

I need precise low-ppm crystal for my circuit with 8-bit ATMEGA (AT90USB1286). Currently 18pF TXC HC-49 (11.5x5mm) is used. I need also minimize size to reduce potential EMC and PCB. TXC - 7M/B ...
1
vote
1answer
53 views

No correct signal from ATMEGA162 UART

I got the following circuit: simulate this circuit – Schematic created using CircuitLab And this code to run it: ...
0
votes
0answers
35 views

I am able to program atmega8 but not atmega16/32

I am new to microcontrollers and am taking it as a hobby. I have USBasp programmer with a 40 pin ZIF socket. I used to program my atmega8 for blinking LED's and other purposes. Now I am working with ...
0
votes
0answers
51 views

ATmega 1284P lockup or stuck in reset after lightening storm, then fully recovers. How to prevent it?

I have a custom Arduino based data collection system which has been running happily, reporting data over a cellular connection on solar power for a few months. After a lightening storm it stopped ...
2
votes
3answers
465 views

What does the T symbol signify in electrical diagrams?

I'm trying to connect to my atmega1284rfr2 using the basic application circuit in their datasheet. The red lines and letters are my own annotations. I'm having trouble understanding what all the ...
1
vote
0answers
62 views

Programming Atmega8 with AVRISP mkII Error ispProgramMem

If I go to Tools > Device Programming in AVRStudio 6.0 to program the Atmega8 everything is working fine. I've set the ISP frequency to 1 MHz and checked the ...
0
votes
1answer
50 views

Controlling AC devices using ATmega8

I have an microcontroller ATmega8, TRIAC MOC3083 and thyristor M166P. I need to develop and device which will turn on/off lamp(220V). But while I'm developing I don't want work with AC 220V now, DC ...
2
votes
3answers
72 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 ...
1
vote
0answers
64 views

How to get an ENC28J60 to work?

For starters: Yes I know I'm about to reinvent the wheel with the following task ahead. I want to create my own library for the ENC28J60 for an AVR (ATMEGA1284P). So I've been browsing the net for ...
0
votes
4answers
93 views

Is it possible to power AVR micro project with just one coin cell battery?

My current project setup is: ATmega328P micro with 32 LEDS driven by 4 8-bit shift registers. System without LEDs draws 20mA of current continuously. With all LEDs lit at the same time, it draws ...
1
vote
4answers
94 views

Blink LED example does not work

I'm trying to run standard Blink LED example on Atmega8A, but my LED doesn't blink. Here is my circuit: And here is my code: ...
1
vote
1answer
50 views

How to put these together and do I need a PWM expander?

I'm having here an Atmega8 a PSM42BYGHW603 stepper motor the L298 stepper motor driver ...
1
vote
2answers
139 views

Removable MCU for a PCB

I am trying to make my first PCB, an would like to program an ATmega328P-PU using my Arduino and a breadboard and transfer it to my printed circuit board. My problem is that either I will make a ...
2
votes
1answer
55 views

ATmega32U4: no output

I've got a little problem with a board I designed. What I tried to achieve is to control some LEDs with a microcontroller featuring an Arduino bootloader so that you can program it with the Arduino ...
0
votes
0answers
33 views

AVR Error Handling: I2C, SPI etc

How would one go about handling errors in AVR interfaces that do not specifically provide any acknowledgement scheme? For example, I have an I2C temperature sensor which I poll every 1 hour. So every ...
0
votes
2answers
69 views

No response from AVR microprocessor while programming

I've been attempting to program a few different micro-controllers using nothing but an FTDI 5V TTL cable and self-written software to bitbang the needed pins on the chips. Until now I had success only ...
0
votes
2answers
91 views

ATmega8 USB programmer

I bought this USB programmer: USBasp USBISP 3.3V / 5V AVR Programmer USB ATMEGA8 . But I can't understand how to connect it. This picture has got 9 circle inputs and 1 square input but all the ...
2
votes
0answers
43 views

AVR Flash Writing Error

Got a very strange error while trying to write to ATmega128. Below are the results for 3 cases (using different software but the same USBASP programmer and the same HEX file) Case 1 : AVRDUDESS 2.3: ...
1
vote
4answers
112 views

Control strong DC motor with microcontroller

Could anyone explain to me what it takes to control a strong DC motor with e.g. an AVR? For example if I have a 24V Motor with 5A or more. How can I build such a circuit? Especially if I want to ...
1
vote
3answers
105 views

How can I make a latch in AVR without interrupts?

I want to make a simple circuit that when you press a pushbutton, an LED lights up stays lit until the button is pressed again. I haven't delved into interrupts yet on AVR, and was wondering whether ...
1
vote
1answer
60 views

ATmega128 Extended I/O

This is my fist time working with a "bigger" micro controller, ATmega128. So far I've worked with ATmega328, ATmega8 etc. Reading through the datasheet, I didn't understand couple of points That ...
3
votes
1answer
142 views

ATtiny External Clock not working

So, I've been wanting to break away from the arduino abstraction for a while now. I made a board that has an ATtiny10 on it with a crystal and an output. I cannot for the life of me understand what ...
1
vote
3answers
337 views

Why usb to serial port converter can’t program avr microcontroller?

With a serial port or parallel port in pc programming avr microcontroller is very easy and cheap. Problem is, no modern computer come with serial or parallel port. So, usb to serial converter should ...
0
votes
0answers
226 views

USBasp: Why can I program ATtiny13A but not Atmega8A?

I am using USBasp V 2.0 LC Technology with slow SCK jumper connected. The firmware is not updated. I don’t know if I need to update the firmware. I have successfully programmed ATtiny13A, though ...
0
votes
1answer
25 views

How to check the source of reset in ATMEGA644p

I am trying to find the source of reset for ATMEGA644p, but I couldn't find the way to do it! MCUCSR gives error in atmel studio as not declared and the datasheet also doesn't have it.
1
vote
2answers
80 views

Arithmetic Overflow ATmega328

I have written the following function to calculate the current timestamp (since 00h Jan 1 1900). The output I get is: ...
3
votes
1answer
44 views

Speed and Position Control for high-volt Elektro Motor with AVR

Is there anything that one can purchase to control speed and position of a high voltage electro motor? I am quite a bit of a noob at this but I could think of a circuit using photo-sensors or ...
3
votes
1answer
66 views

AVR - ATmega16 - Timer config

Trying to figure out the timer setup in Atmel Studio 6 for an ATmega16 microcontroller. And I just don't get it. I am trying to create a TickCount similar to GetTickCount() Retrieves the number of ...