We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [avr]

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

Filter by
Sorted by
Tagged with
-5
votes
1answer
53 views

IHave a problem with ADC in AVR

Hello.,I'm working on a project and I didn't get that How I change the range from 0 to 1042(ADC 10bit) To the range from 0 to 5
0
votes
1answer
326 views

Help with Atmega32u4 custom PCB

I have attempted to design my own custom Atmega32u4 board, but when I assembled it it didn't show up in windows device manager. I fixed the problem where I forgot to connect VBUS to VCC with a jumper ...
1
vote
2answers
472 views

Timer0 overflow interrupt does not work on ATtiny10

I am trying to use the Timer0 overflow interrupt to make a little project. I used such a timer in the ATtiny45 and it worked, but with ATtiny10 no result. So I tried an easy LED blinking program and ...
1
vote
2answers
169 views

AVR bitwise operation: making a NOT with a microcontroller

I'm programming an ATtiny10, i have two spare pins, one of which is the external interrupt pin on PB2, and i want to write the inverse of that signal to PB1. I want to spare a component, since i have ...
0
votes
3answers
275 views

GPIO state of MCU (AVR) with no supply voltage

In general: what state do the GPIOs of a MCU (an AVR in my case) have when there is no supply voltage and the MCU is "off". Am I right that the pins are floating as there isn't any "reference" for the ...
0
votes
2answers
97 views

Atmega88p with shift register 74hc595

I need to use a shift register to control multiple leds, but I need to control each one individually. The idea would be to send a buffer with the data, however I need to have several active leds and ...
-1
votes
2answers
166 views

when dividing two integer result truncated to 0 [closed]

when i divide two integer and if the result is below like 0.987, then it become zero ...
0
votes
0answers
64 views

can't figure out why my micronucleus/V-USB setup doesn't work

I built a small attiny85-based board using vusb and essentially the schematic of the discontinued Sparkfun "AVR Stick" (at least on the usb/uC side; see https://www.sparkfun.com/datasheets/Widgets/AVR-...
0
votes
2answers
793 views

How to load immediate negative value in a register?

For example on 8-bit AVR given a register r16 I do something like ldi r16, 44 and this way I can give it positive values from 0 ...
1
vote
1answer
79 views

How to show a long sentence on character LCD by using bascom?

I want to show a long message that going to differ every time and it's 3 lines or less. This message comes from Sim900. I cant show the whole sentence on my 4x20 lcd. how can I print it in several ...
2
votes
1answer
366 views

Atmel Chip not recognized as USB device. How to troubleshoot

I've soldered the AT90USB1286 Chip on a PCB like on this circuit: Imgur If I measure the pins, caps, resistors etc. with a multimeter, everything seems to be powered and fine. Reset button pulls to ...
3
votes
1answer
1k views

Atmega naming scheme (324p vs 328p)

I am looking into AVR chips (big fan) for a personal project. I need capabilities similar to Arduino Uno, so I recently compared Atmega 328p and Atmega 324p. To my surprise the 324p has significantly ...
0
votes
1answer
159 views

AT90USB162 not detected in windows

I have an AT90USB162, have it set up like this: I'm trying to program the chip using Atmel FLIP, but I can't because it's not detected. What could be the problem and how can I fix it?
2
votes
1answer
83 views

Atmega32u - Ground in bus powered configuration

The Datasheet provies an example configuration for when the device is powered from the bus, and shows the bus Vss connected to ...
0
votes
1answer
93 views

AVR programming

This question might be asked somewhere, if so all references would be appreciated. Hello, I have programmed Atmel chip Atmega32U4 through USB. It is possible because it supports USB programming. I ...
1
vote
1answer
322 views

while ( !(UCSRA & (1<<RXC)) ) vs while (RXC == 0)

I have question about code below : ...
0
votes
1answer
2k views

AVR Programming : Chip Enable Program Error

I am working on avr controllers for a while, but I have problem with "progisp" avr programming software. When I buy a new micro-controller like atmega32 it can be programmed properly for a while but ...
0
votes
3answers
3k views

avrdude: error: program enable: target doesn't answer. 1

Before I can program my ATmega32 through USBasp but now only in 30 times or more try I can program ATmega32. I get this error ...
1
vote
1answer
105 views

ATTiny414 inline assembly operand constraints for IO pin parameter

I'm trying to use the light_ws2812 library to drive WS2812 LEDs from an ATTiny414. The core of that library is an inline assembly snippet that bitbangs the serial line. here it is with the timing-nops ...
8
votes
2answers
830 views

ATtiny13A - Can't generate software PWM with CTC mode

I'm trying to make a remote control RGB LED light using an ATtiny13A. I know the ATtiny85 is better suited for this purpose, and I know I might not eventually be able to fit the whole code, but for ...
3
votes
2answers
5k views

atmel studio for mac

Is Atmel Studio compatible with Mac or Linux? It seems like there is only Windows support from the downlaods here: http://www.microchip.com/mplab/avr-support/atmel-studio-7.
1
vote
2answers
441 views

Press and hold the reset button to reset AVR!

I connected a tactile switch to the AVR reset button according to the circuit below. every time I press the button the AVR resets itself but my question is: Is there a way to make this button acts ...
-6
votes
3answers
202 views

How did my ATmega328p chips suddenly start dying? [closed]

I recently started working on a little self balancing robot using ATmega328P. I made a simple PCB with an ATmega, a L293D, terminals for 2 motors and a MPU 6050 and so on. I have a huge 25V 2200uF ...
0
votes
1answer
70 views

LPF and AMP for ADC with op amp not giving sufficient gain

I have a project where I need to have audio input into atmega168PA. I've decided to implement it by using an electret microphone which will feed into op amplifier for low-pass filtering and ...
1
vote
1answer
277 views

Attiny10 with RSTDISBL and USBAsp

I have some project what requires all GPIO pins of attiny10 so I have to program RSTDISBL fuse. But only programmer I have is low voltage USBasp (with latest firmware supporting TPI interface). The ...
0
votes
1answer
539 views

I can't flash my new ATMega328p with PL2303 USB-TTL converter

I've soldered my ATMega328p-au to a SMD to DIP board, and I've connected pins like this: USB | ATMega RX ---> TX TX ---> RX 5v ----> 5v GND -> GND and GND --> button --> RESET My USB-TTL converter ...
1
vote
1answer
201 views

AVR-GCC initialization code

Consider the following asm.S .global main main: rjmp main Compile and dump it with these commands: ...
0
votes
1answer
176 views

Output Compare Interrupt does not work avr atmega

Hey I'm trying to do blinking led using interrupts on 16 bit timer. My atmega model is Atmega168A. Chip clock rate is 12Mhz. Here is my code: ...
0
votes
1answer
96 views

How to program ATmega8U2

I was given an ATmega8U2 chip by my friend and I have been doing a bit of research about it. It says it does not come with a pre-programmed with a boot loader, so I was just interested about how to ...
0
votes
1answer
156 views

LED blinking while loop not working AVR timer 0

It is strange and rare. I am trying to blink a LED at PD0 at 2hz, but it doesn't work. Seems to me that while loop doesn't work at all. I have triple checked the code. what is the problem here? ...
0
votes
2answers
448 views

Getting Accelerometer values from MPU 6050

I m trying to read accelerometer values from mpu 6050 in atmega328p (Arduino UNO). I want an embedded c program that's why don't wanna use any external lib. So I read about I2C protocol, read the ...
0
votes
3answers
112 views

Timer interrupt (ISR)

I am using a timer interrupt for multiplexing however my question relates more closely to interrupt service routines. If I set the prescaler and turn on a timer, using the below code I can run code ...
0
votes
0answers
20 views

Unexpected AVR prescaling weird problem

I have problem setting the correct prescaler for a clock using an external 32k crystal. Not really a problem, but rather an unknown. The correct prescaler for it should be 1/128 ...
1
vote
2answers
223 views

Low-power solar cell source using capacitors

I am designing a circuit using AtTiny10 to supply a downstream microcontroller with power using only capacitors and a small solar cell. Would the following design work ? The basic idea is that the ...
0
votes
1answer
73 views

ATMega32, PetitFS, writing measurements to file

I'm trying to write measurements from external sensor to the file (lets say 1 per second). I'm using ATMega32 and PetitFS. At this moment I'm able to write one measure: ...
0
votes
1answer
169 views

Will other devices interfere with programming a ATmega32U4 if attached to SPI bus?

I’m designing a custom PCB around an ATMega32U4. The 32u4 will talk to another onboard component via the SPI bus. Since the SPI pins (MISO, MOSI, SCK) are also used for ISP programming could other ...
0
votes
2answers
328 views
1
vote
4answers
404 views

Dual SPI master with ATmega32u4

An unexpected need emerged in my design, which is to control 2 slave SPI devices simultaneously. At first, of course, I was planning to to use the SPI Bus as usual and control both devices using the /...
1
vote
1answer
87 views

Multiplexing Red and green dual led not being switched on properly

I am having problem getting this red and green led to switch on in its yellow color state. Red + green = yellow!! But it simply refused to do so. It's more like an annoyance than a real big deal ...
2
votes
1answer
238 views

“light_ws2812” library 10x slower than required (AVR C, ATMega328p int. 8Mhz)

So I'm trying to run some SK6812 (WS2812 clones) on a standalone ATMega328p. The output signal is too slow! I define F_CPU as 8000000 (8Mhz), both in the code and in the Atmel Studio Symbols, but my ...
0
votes
0answers
32 views

Arduino I2C bus fails when one slave is powered down [duplicate]

I have a set of Arduino Nano units where one is I2C master broadcasting messages to a number of slaves. It works perfectly fine when they are all powered on. The Arduino units are all interconnected ...
1
vote
3answers
1k views

AVR assembly language on Division

how do i performs a division by 4 of the 16-bit unsigned value in registers r4:r5 Where r4 is the most significant bit. I understand that by division of 4 which means i have to shift the bit by 2. ...
0
votes
2answers
118 views

atmega8a-pu PORTC not working in 3v3

I have atmega8a-pu and not problem with 5v. but when i connect 3v3 to ...
2
votes
2answers
394 views

Unsigned 32-bit multiply in AVR assembly

How do I perform a multiplication by 2 of the unsigned 32-bit quantity in registers r18:r19:r20:r21 where r18 is the most ...
1
vote
2answers
443 views

24-bit two's complement division in AVR assembly

How do I perform a division by 2 of the 24-bit two's complement value in registers r6:r5:r4. (r6 is the most significant byte.) From what I have this is what I tried: ...
0
votes
1answer
466 views

How many PWM output channels does the Atmega4809 really have?

How many PWM outputs does the Atmega4809 really have? The Microchip site claims it has 8. The datasheet for the Atmega4809 microcontroller is split up into two pdfs. This one is for the megaAVR ...
0
votes
1answer
163 views

Arduino Nano pins are always high

i started to build an infrared transmitter (commander). I use 4 pushbuttons for left, right, up, down. These buttons are pulling down when pressed. I used internal pullup resistors. My prboblem is ...
0
votes
2answers
164 views

Strange behavior of data

I declare global variables to read the sensor MPU9250. ...
5
votes
2answers
475 views

Programming several AVRs with one ISP: which line to break?

Let's suppose that I have two AVRs connected to one ISP connector. To programm only one MCU in this configuration I neet to break one (or mayby several) lines goes to the MCU I don't want to be ...
1
vote
1answer
463 views

How to recover locked ATTiny 85

I was following this tutorial: http://highlowtech.org/?p=1695 and by mistake I uploaded code with 8 MHz External clock settings. The tutorial says ...