Questions tagged [avr]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
94 views

What does LSB mean in PWM?

I have this PWM exam preparation question in Computer Engineering where it says "What is one V_LSB?". However we've discussed nothing about LSB in the PWM section. What does it means?
user avatar
-2 votes
2 answers
61 views

Is my microcontroller damaged?

I tried the simplest code with a blinking LED, but it is not working. I connected the LED to PB0 through a 1k resistor. The software (AVRDUDESS) is detecting the microcontroller (ATmega16) fine, but ...
user avatar
  • 49
0 votes
3 answers
109 views

Generate a signal with 8 fixed-width pulse with varying interval

I am working on an ultrasound device. We want to generate a particular signal to drive the 1 MHz piezoelectric transducer at various resonance frequencies point. The goal is to write a code using ...
user avatar
1 vote
1 answer
74 views

Simple AVR interrupts in C - How to cleanly stop and restart "INT0"?

I'm trying to use an ATTiny84's INT0 pin to detect a falling edge event on a 1 kHz signal. What is the correct way to temporarily halt this interrupt INT0, and then resuming it at a later time, ...
user avatar
0 votes
1 answer
42 views

Help with AVR ADC and Serial port programming and integrating with python

I am a 2nd year electrical engineering student. I was stuck at this: Why do both seven segment displays show only 8 even when simulation is not running? Basically I am trying to take temperature data ...
user avatar
  • 5
0 votes
1 answer
90 views

How to connect USB to an ATmega328p?

I'm making a board that requires an ATmega328P to respond to commands from a computer. It needs to be connected with USB. I am new to this and trying to figure out how to best do this. I know I'll ...
user avatar
  • 1
1 vote
0 answers
33 views

AVR MCUs parametric search shows number of USB modules but no USB interface

I am looking for AVR MCUs that have USB 2.0 (or greater) capabilities. Using their website for Parametric search, I see that some MCUs have USB modules, but they are not listed as MCUs that have a USB ...
user avatar
1 vote
1 answer
61 views

AVR-libc `uart_putchar` implementation

In AVR-libc page 143 the implementation of the function uart_putchar() is typical as the following: ...
user avatar
  • 488
2 votes
2 answers
105 views

ATmega32U4 without USB: how to handle usuned pins

On the ATmega32U4 MCU there are several pins related to USB: VBUS D+ D- UCAP UGND UVCC In the datasheet and in almost all reference schematics I find on the Internet, it's explained how to connect ...
user avatar
  • 875
1 vote
0 answers
51 views

AVR self-reset / hardware reset from own own pin

Can I use a capacitor to perform a self-reset / hardware reset of an AVR microcontroller? The capacitor would be driven low by a pin on the microcontroller. Arduino uses this mechanism for programming ...
user avatar
2 votes
2 answers
58 views

Are there any ramifications of leaving an AVR in debugWIRE mode?

I have a product with an external connector with the intentions of using this for applying updates to an ATMEGA328P later on down the road. There are limited pins available, so I can't use SPI for ...
user avatar
  • 161
1 vote
3 answers
182 views

RS-485 communication with slave microcontrollers driving addressable LEDs?

I am trying to figure out how to achieve the master-slave configuration shown below. The aim is to individually address an array of 150mA LEDs, driven by the IS31FL3265A PWM driver. For this specific ...
user avatar
0 votes
1 answer
41 views

Read MicroSD card with USB reader while it is connected to (powered-off) microcontroller

I have created a small breakout board, where a microSD card is inserted and I can access its signals. Now, when the necessary SD signals are connected to an AVR microcontroller via SPI, they ...
user avatar
  • 363
0 votes
2 answers
130 views

How many times can a register bit be changed in AVR?

I am writing a program for an ATmega328P. I have a while loop inside which I am enabling the UART receiver complete interrupt flag using the command ...
user avatar
0 votes
1 answer
72 views

Making duty cycle with CTC mode in AVR without using interrupt

I am writing a program to make an output with a 30% duty cycle and a frequency of 3 kHz using an ATmega32 microcontroller. My controller's frequency is 8 MHz and I am going to decrease it to 1 MHz by ...
user avatar
  • 53
2 votes
1 answer
82 views

Strange ATmega32 behavior with assembly code

I posted a kind of similar question recently, but it was not that organized, so here I am trying again :) I wrote this short assembly code to blink an LED at different intervals depending on the state ...
user avatar
0 votes
2 answers
38 views

Problem interfacing stepper motor with Atmega 32

I have been trying to interface a bipolar stepper motor with an ATmega32 controller using AVR assembly, but it just keeps clicking without movement or just move back and forth in the same step. Here ...
user avatar
0 votes
2 answers
88 views

AVR reset pin capacitor causes chip to enter bootloader on powerup

I have a circuit using an ATmega32U4 and am using the Arduino Leonardo/Micro Caterina bootloader (the one that comes with arduinoIDE v1.8.13). The problem I am having is on power-up (via USB ...
user avatar
  • 151
0 votes
3 answers
170 views

How does one program for first time and reprogram microcontrollers that are mounted to a PCB?

Arduino Unos and Microchip Curiosity Nanos are for prototyping and easy and ready to program, but now I am struggling to find the resource material that would detail taking the chip off the breakout ...
user avatar
  • 187
0 votes
4 answers
130 views

Is maximum/minimum voltage always compared as difference voltage for a microcontroller?

Let's take the ATmega328P for example. It has a minimum input voltage of -0.5 and maximum input voltage of Vcc + 0.5. But what ...
user avatar
  • 769
0 votes
1 answer
95 views

Faster Timer0 overflow than 2 ms on Attiny85

I'm trying to get a Timer0 overflow with an overflow every 500us, but can't find a solution to get it so low. I'm running the Attiny85 on its internal 1 MHz clock, so I know it is not gonna be the ...
user avatar
  • 309
2 votes
3 answers
242 views

Can I control IRFZ44N Mosfet directly from 5V microcontroller?

I know that IRFZ44N is not a logic level Mosfet, but I need it to control only 12v 1.2A (14.4W). Can I control it by applying only 5V on gate from an atmega microcontroller? I checked the datasheet ...
user avatar
0 votes
2 answers
92 views

Linear and log sweep in AVR

My application requires a frequency sweep in a coil and measuring the resultant resonant frequency from the coil after it has settled. I can do the second part i.e. wait and count the rising edges of ...
user avatar
0 votes
0 answers
118 views

Store Receive bytes from UART as a string in BASCOM AVR

I'm working on receive interrupt uart and I wanna store all of data as a string . I also catch data (one by one) byte until receiving ETX . When I catch ETX ,it means end of datas. unfortunately, my ...
user avatar
0 votes
2 answers
115 views

Can battery levels ever be reliably read while it is powering an embedded system

I have an AVR microcontroller (atmega168pa) powered through two AA battery cells. When I read the battery voltage while it is not hooked up to the bread board, the voltage might read as 3.14 on a DMM. ...
user avatar
  • 303
1 vote
0 answers
90 views

7-segment display communication

I have attempted to solve this problem making kmaps for the binary counter, mux and decoder however I'm getting stuck on the making them all talk to each other bit, I am using a ATmega32L and a ...
user avatar
  • 11
0 votes
1 answer
81 views

How to make AT90USB646 run at 3.3v VCC?

[WHAT I DID] I've made one prototype of AT90USB646 running at 16MHz, 5V. The design is almost the same as Teensy++ (schematics can be found here https://www.pjrc.com/teensy/schematic.html). [WHAT I AM ...
user avatar
  • 101
0 votes
1 answer
149 views

Confused about MAX6675 thermocouple sensor SPI protocol

I'm using an AVR microcontroller to take readings from a MAX6675 (SPI K-type thermocouple ADC chip). I am having difficulty understanding what is required by this chip's SPI interface. The datasheet (...
user avatar
2 votes
1 answer
72 views

Strange behavior when splitting an AVR program across functions

I'm trying to run a very basic "blinker" program on an Atmega328P. Here it is in its entirety: ...
user avatar
  • 147
1 vote
1 answer
126 views

Should I be worried about the possibility of a microcontroller failing?

I'm making a commercial product for the first time and I am worried about the stability of my circuit over time. The product is a door interlocking system. It locks and unlocks doors using solenoid ...
user avatar
  • 310
1 vote
1 answer
144 views

Please confirm I can use this ATtiny's IO as I intend to

This is the first time I'm implementing a µController in a design (just have some experience with Arduino). So I just wanted to make sure that this will actually work instead of finding out once I ...
user avatar
  • 407
2 votes
3 answers
824 views

Powering a Raspberry Pi Zero through a MOSFET

I have a Raspberry Pi Zero which I want to be able to power on/off via code, so I made this circuit: simulate this circuit – Schematic created using CircuitLab I would like to avoid powering ...
user avatar
0 votes
1 answer
56 views

Why can't I connect these two components in Altium?

It continues showing me green errors. Why? I do not know what to do. It continues showing me this and I really need to make this PCB. I don't know how to avoid this problem. Can someone please help?
user avatar
0 votes
1 answer
48 views

Pogo pin version of ISP cable for AVR mega8 in TQFP-32 package [closed]

There are a few 6pin and 10pin pogo variants of Atmel ISP adapters that require dedicated ISP pogo pads on the PCB. There are full TQFP-32 ZIF sockets that can be used to program any AVR in that ...
user avatar
0 votes
1 answer
45 views

AVR ATMEGA32A UART not send and receive data unless programmer is connected

The code in micro is to turn a LED on when it receives "1" from UART and off when receives "0". For VCC I use a phone adapter (5V, 0.7A) which works properly and is suitable for ...
user avatar
1 vote
1 answer
75 views

AtTiny214 can't change waveform output pins

I am trying to program my AtTiny214 (TinyAVR1 Series chip, SOIC-14 version, relevant datasheet: Datasheet) so that I have 2 PWM outputs with different duty cycles. My problem is: Changing the contents ...
user avatar
  • 31
0 votes
1 answer
154 views

7 segment display not showing digits simultaneously with an ATMega32

I want to show the digits'18221021' simultaneously. The seven segment display should show all 8 digits at a once. I wrote the following code. It shows all the digits but not simultaneously. It is ...
user avatar
0 votes
1 answer
61 views

Error in LCD while interfacing with ATmega 32

I am trying to interface a normal keypad and LCD .where for example if i press '1' in keypad it will show 'one' in the display . if i press '=' it will show 'EQUAL' in Display . i developed below code ...
user avatar
1 vote
2 answers
109 views

ATTiny204 accurate delay with correct fuses and F_CPU

So I worked with an ATTiny for the first time today and I was quite different from my regular Arduino / ESP8266 programming. When testing the Blink script I noticed that the delays weren't correct at ...
user avatar
0 votes
1 answer
65 views

ATMega2561 - How to connect this ambient light sensor using 1-Wire?

I am trying to connect the following components to an AVR ATMega2561: 1-Wire Master Interface DS2484 datasheet here RGB Ambient Light Sensor APDS-9250 datasheet here I have already managed to ...
user avatar
0 votes
2 answers
66 views

Measure ATmega168PA internal temperature while using other ADC channels at 5V reference

I have a device that continuously measures the value of 3 sensors connected to 3 ADC pins and working at 5V reference, so I have two options for voltage reference selection: Connecting AREF pin to 5V ...
user avatar
  • 277
3 votes
2 answers
123 views

The function setup () executes after ATmega328P wake up from the sleep mode

I am using ATmega328P in deep-sleep mode in Arduino IDE. For wake up I am using PCINT. I can see it is working but setup () also executes after wakeup. Is it ...
user avatar
0 votes
0 answers
49 views

What is this element with triangle shapes from the ATmega datasheet? [duplicate]

I am trying to understanding the schematics of the I/O of ATmega microcontrollers. But I can't identify the red marked element. I just want to know its name and its functionality in the circuit. The ...
user avatar
  • 1
0 votes
1 answer
65 views

Unable to correctly send keypresses using the LUFA library

I'm making a board with an atmega32u4 on it for the controller for a keyboard, and am having issues with telling the host computer that a key is pressed. I've modified the Keyboard demo supplied with ...
user avatar
0 votes
0 answers
69 views

AVR: Interrupts from sleep not working properly

I am trying to program a piece of code (on an ATMEGA4809-nano) which creates an interrupt when a button is pressed or released. I have implemented it, but for some reason the interrupts aren't working ...
user avatar
1 vote
0 answers
88 views

Writing an Array to EEPROM Problem

When I write an array to EEPROM and read it I always get 0xFF. I am writing in addres 0x0001 to 0x0005. The password I am entering is 1,1,1,1,1 saved in uint8 array ...
user avatar
0 votes
1 answer
228 views

Difficulty programming a custom Atmega32u4 board with a snap programmer using ISP

I've made a PCB which contains an Atmega32u4, and just finished soldering it up today. Now, I realised that I bought the wrong Atmega32u4 version - I bought the version which does not by default use ...
user avatar
0 votes
1 answer
47 views

Where does ATXMEGA32E5 epad connects to?

About the ATXMEGA32E5-MUR (32-VFQFN Exposed Pad) Package: I do not know where the Central PAD connects to, since the datasheet does not mention it. So I guess it is NC (No connect)? And it does not ...
user avatar
2 votes
1 answer
64 views

Unusually long programming times with ATmega328p

I'm programming an ATmega328p using avrdude, and with a program size of 3074B, I am experiencing approximately 13 seconds of programming time. This is painfully slow when developing with the ...
user avatar
  • 235
0 votes
1 answer
69 views

AVR GDB Inconsistencies

I'm trying to debug a program running on an ATtiny84A, and I am having trouble understanding either how to use it, or interpreting its output, or both. For testing purposes, I created a simple program ...
user avatar
  • 235

1
2 3 4 5
37