Tagged Questions

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
22 views

Need help with pushbutton on atmega8

This is what I have: Atmega 8 wired for programming, confirmed working, programmer is my power supply. 2 leds connected via 470Ohm pull up reisistors to ports PORTB0, PORTB1 and to GROUND, working. ...
0
votes
1answer
50 views

ATmega8 LED blinking project not working properly

I am making a simple project using ATmega8 microchip. I uploaded this code to the AVR: ...
1
vote
1answer
58 views

Tie Arduino - ATMEGA328P reset pin directly to +5V?

I would like to know if it's okay to tie the reset pin on an ATMEGA328P directly to +5V without using a resistor to avoid random resets and lower part count. If it's not okay, can you explain why it's ...
-4
votes
0answers
31 views

How to send the data over the voice call [on hold]

Instead of repeating the question attaching the link of my thread. If you have any guideline for me that would be really helpful ...
-1
votes
0answers
32 views

AVR programming failed during verifying FLASH memory

I have an ATmega 644PA microcontroller. I am using AVR studio 4.19 and a JTAG ICE to program it. However, during the programming when the AVR studio is verifying the FLASH's content I get the ...
0
votes
1answer
35 views

XMega bootloader - How to use make use of the functions in assembly source file

Its been two days I'm trying to write a Bootloader for ATXMega32E5. The Atmel studio doesn't have boot.h header file supporting XMega. As a result of searching and ...
0
votes
1answer
25 views

chip45 bootloader in Atmega32U4

Good morning. I am using the chip45 bootloader for an Atmega chip. The chip being used is the Atmega32U4 chip ("chip45boot2_atmega32u4_uart1_v2.9Q"). I am having a strange error. I burn the ...
0
votes
1answer
26 views

AVR TIMER0 treating with prescaler and without to blink a led

I am playing with ATMEGA168A's TIMER0. CPU is running at 20MHz and there are two treatments. a) Blink a LED at 20ms frequency by using a 1024 prescaler. In that case i count the the times that an ...
-3
votes
0answers
20 views

Avr based adc with ldr and piezo buzzer connection c program [on hold]

Write a program which generates a frequency in audible range (ca. 100 -1000 Hz) which is related to the measured light intensity. More light shall result in a higher tone. The ADC Values of ADC ...
1
vote
2answers
86 views

ATMEGA328p ADC keeps returning 1023

I'm trying to configure my ATMEGA328p to measure temperature using the TMP36GZ temperature sensor. However, the 10-bit ADC keeps returning 1023. I've tried disconnecting the temperature sensor (it ...
1
vote
0answers
40 views

Can manage to read device ID from an AVR only once?

I'm using an ATmega48 device and my debugger is the Atmel ICE. I manage to connect to the device only once, the 2nd time causes a "failed to enter programming mode" error. Cycling power to the device ...
2
votes
2answers
210 views

How can I bind a local variable to AVR's rXX register?

I need to have programmable pause with precision as high as possible. To accomplish this I have the following GCC code: ...
0
votes
0answers
44 views

Determining temperature using lm35 with avr MCU (program debugging) [closed]

This Program converts the analog input from LM35 into binary outputs: ...
0
votes
1answer
55 views

Can some pins of the same port on AVR MCU's be declared as inputs and some as outputs?

Can some pins of the same port of AVR MCU's be declared as inputs and some as outputs? If yes, then I am not able to understand how this works since we have to compare the pins of the port and also ...
0
votes
1answer
41 views

AVR SPI slower than expected

I'm running an ATMega88A at 8MHz and have the SPI configured to run at Fosc/2 = 4MHz. In theory, shifting out 5000 bytes over SPI should take 1/4000000 * 8 * 5000 = 10ms. But according to the ...
1
vote
1answer
25 views

AVR SPI2X has no effect

I've got an ATMega88A configured to run on internal 8MHz clock: lfuse = 0xE2 hfuse = 0xDF efuse = 0x01 F_CPU defined as 8000000 This in confirmed in the 'real ...
3
votes
3answers
161 views

AVR SRAM limitation

I'm just an enthusiast looking for some advice. I'd like to use a microcontroller to read frames from a camera and write those frames to a small LCD screen. The camera and screen are on the same SPI ...
1
vote
1answer
34 views

ATmega 23K256 SPI RAM and ISP together

I want to connect 23K256 SPI RAM to ATmega. Do ISP programming will work together with SPI RAM connected. Thanks.
1
vote
1answer
93 views

I2C protocol debugging using oscilloscope

We are testing an I2C accelerometer connected to the ATMega32A micro-controller. The accelerometer was working fine. We can write and read the registers using I2C protocol. When connected to the ...
0
votes
0answers
24 views

Eclipse AVR Plugin: Broken pipe error

I am trying to get away from the Arduino side of life and get into AVR's. I work on a mac as my main development system. I have followed two tutorials on how to set up Eclipse for programming AVR's. ...
0
votes
1answer
58 views

Choosing between internal oscillator and external crystal- ATXMega32E5

We are working with a modern microcontroller ATXMega32E5, from the ATMEL XMega family. Our aim is to use the UART of the controller for effective communication, with the speed of about 9600 or 4800 ...
6
votes
1answer
60 views

Millis versus centis on AVR platform

I am building a device on the AVR platform. The device will need some timing information, so I was thinking of reimplementing Arduino millis-like functionality ...
1
vote
1answer
55 views

ATmega328A UART: everything working, but not as expected

I am trying to get UART working via the ATmega328A. I want to enter a character, and get that character to be printed out. However, when my code is run this is what happens: I enter one character, ...
0
votes
1answer
93 views

Best microcontroller for industrial applications [closed]

I have an industrial project requirement to build a device having this functionality: Store Data Send Data to Web Server Device to be placed under scorching sun Sensors - around 5 A Graphical ...
2
votes
0answers
53 views

What happens to AVR registers during multi-cycle instructions?

This is more of a theoretical question... (Also my first on Stack Overflow) I am wondering what happens to Atmel AVR microcontroller (i.e. ATTINY85) registers during a multi-cycle instruction. i.e. ...
1
vote
1answer
94 views

SPI not working, ATmega328 only sending 1 byte

I am trying to get SPI working on an ATmega328. This is my code: ...
1
vote
1answer
40 views

Cannot program ATTiny85 fused for 32 kHz

Now, I know what you're thinking. I've been thinking it all night too. Yes, I know that with the tiny fused for a 32 kHz crystal that I'll need the SPI clock to be 8 kHz or less. Even that, however, ...
1
vote
1answer
18 views

How to drain power with pins for led matrix on atmega32 instead of using a led driver

I want to make a led driver without the tlc594 series. I use the atmega32 of which I can use 1 PWM pin. The PWM pin will be connected to the base of the transistors. With the PWM pulse I can dim the ...
0
votes
2answers
64 views

How do I simulate a physical push button from an AVR

I've been messing a bit with EL wire that I purchased from amazon, I dissected the control unit and it appears to consist of a transformer, timing circuits(s) and a push button. When you push the ...
0
votes
0answers
18 views

Anyone experienced not being able to debug on AVR Studio 6?

I have a small C project with an ATTiny MCU, when I enter debug mode the dis-assembly window shows NOP for all lines and I can not step in the code... entering "0x0000,prog" in the address field does ...
0
votes
3answers
100 views

2 Digit 7 Segment Display Driver

I need to display the temperature acquired by my LM35 on a 2 digit 7 segment display. What I have is LTD383-R2 Common Anode Display. Datasheet here. The display has 1 Anode pin + 14 Cathode pins for ...
1
vote
1answer
32 views

Can avrdude address individual usbtiny programmers?

I'm envisioning a panel programming jig. In my mind, it consists of a Raspberry Pi, a powered USB hub, and a collection of usbtiny clones each connected to a pogo jig and a target on a panel. The ...
0
votes
0answers
66 views

I2C interfacing with ATmega32 and ArduinoMega2560 failed

I'm trying out I2C interfacing the ATmega32 with Arduino Mega2560 Board without success. The Arduino Board is configured to be the Master Read. The Atmega32 is configured to be the Slave Write. I ...
2
votes
4answers
135 views

Driving an LED from a uC pin with the Anode above uC's Vcc rail

I am using a 3.3V uC (ATMega 328p in Arduino Pro Mini) running from 3 alkalines (nominal 4.5V). So Vin=4.5V, Vcc=3.3V I'd like to drive LEDs from some pins, say at 20ma each. And I was thinking to ...
1
vote
2answers
70 views

AVR main loop interference with relay

I'm working on a test program on an ATmega164A that toggles a 12V relay on and off (with no load) through a ULN2003A. For my test program, I'm toggling the relay at 100ms. I've got an IN4001 diode ...
2
votes
1answer
109 views

AVR simple bootloader - how to call application code?

I am using the atmega328. I want to create a simple test application using a bootloader. I want to: Blink an led at one speed in the bootloader section of flash, and then blink at another speed in ...
0
votes
0answers
74 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
42 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
280 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
95 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 ...
2
votes
1answer
77 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
108 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
264 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
76 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
47 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
79 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
54 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
92 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
99 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
42 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 ...