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
0
votes
1answer
15 views

How to code communication between two enc28j60?

I am new to embedded programming and enc28j60. I am developing a project which includes two boards with Enc28j60. The working of the system is explained below. board 1 : It will request data from ...
0
votes
1answer
44 views

Stepper Motor wiring confusion

I have got a 6 wire stepper motor. It's a chinese one (OKI KFL42LL) with Black, Brown, Orange, Yellow, White and Grey wire on it. Its specs are 8.7ohm and 7.5 degrees/step. I went through a lot of ...
2
votes
1answer
49 views

ASCII value error during communication (UART) in AVR

I am trying to implement following program in Atmega328P. ...
0
votes
0answers
42 views

AVR: How to share SPI and ISP over level shifter?

I am currently facing the following problem: An AVR, specifically the ATmega2560, communicates with some SPI-Slaves. The AVR runs at 5V (16 MHz), the SPI slaves run at 5V or 3.3V. Due to the ...
0
votes
0answers
17 views

Pullup Rise Time On AVR External Interrupt

Background I am designing a simple lamp dimmer using the Atmel ATTiny441 microcontroller. To this end, I have designed a very basic zero-cross detector which feeds the external interrupt pin (INT0) ...
0
votes
1answer
63 views

Avrdude Does not Read What it Wrote Correctly

Question I am getting back into Atmel AVR programming after nearly a decade off. To this end, I am trying to get the usual blinken lights demo working. Unfortunately this does not function, though ...
0
votes
3answers
63 views

Buffer exceeding ramsize do not produce error in avr-gcc

In my source code I have tried to allocate a huge buffer exceeding the RAMSIZE value (RAM of my component (ATmega324PB) is 2k). ...
0
votes
3answers
55 views

I2C clarification

This question is mainly to check if I understood i2c protocol and hardware correctly. Because pin modes confusing me a little, ia m jsut a beginner. I2C SDA and SCL lines are pulled high with pull up ...
2
votes
2answers
28 views

AVR gcrt1.S behavior

So basically i have decompiled unoptimized simple program and saw that it runs through gcrt1.S, and i dived in to assembly language and tried to understand what exactly it does. here is my code and my ...
0
votes
0answers
19 views

ATtiny Series 1 High Voltage HVSP 12V Enter into UPDI

I'm unable to find usable information on how to enter into UPDI mode after disabling UPDI on new-ish ATtiny Series 1 MCUs, e.g. ATtiny412/817/3216 etc. There some information for older devices like ...
2
votes
1answer
50 views

ATMega328p won't communicate on ICSP

I am in the process of designing and prototyping up a circuit using the ATMega328P in a MLF package. It's the first time I've worked with the '328P on my own circuit, and the first time I've worked ...
0
votes
1answer
97 views

AVR: Why doesn't my if statement yield TRUE?

int i=0; DDRD = 0xff; PORTC = 0xff; while (1) { if(PINC5 == 1) {...} I have been trying to figure out why the comparison of PC5 pin of PORTC with 1 ...
0
votes
0answers
36 views

nRF24L01+ radio module - IRQ problem

I have a problem with IRQ interrupts. After successful transmission, the nRF24L01+ sets the IRQ pin low (about 19 ms), but sometimes doesn't return to high: After every packet transmission (tx ...
2
votes
2answers
76 views

Getting started with AVR programming concepts

I am trying to get started with programming the AVR. I have chosen to use Atmega328P (which is in my Arduino Uno). When I did web search regarding the initial steps for learning the AVR programming, I ...
0
votes
1answer
69 views

How to configure atmega 328 IO pins to reduce the power?

I am having a atmega328p for my home project. Consider the pins Pin B2 - connected to LDO enable. Output Pin D7 - MUX s0 Pin B0 - MUX s1 Pin B1 - MUX s2 Pin B4 - MUX s3 Pin c3 - MUX enable Pin B3 ...
8
votes
5answers
290 views

Infinite loop on microcontroller vs modern CPU

On a microcontroller (more specifically, on an Arduino Uno board using the ATmega 328P microcontroller) I would normally use an infinite loop to check for inputs etc (in Arduino land, this is normally ...
28
votes
6answers
2k views

Due to overcurrent, shouldn't I be extremely cautious when setting an I/O pin as Output?

The question can be applied to any microcontroller with I/O capabilities, but I’m currently working with the popular ATmega328p. Consider the following circuit: A simple SPST Normally Open switch with ...
0
votes
1answer
56 views

received data through UART showing on 7 segment display using ATmega16

I am writing code for Atmega16 for receiving data from another PCB through UART. I want to display the data on a 7-segment 4-digit display, but when code for UART and 7-segment is enabled the data is ...
5
votes
2answers
540 views

Does the counter of an Atmega328 still count inside interrupt handler?

When you enter the interrupt service routine of an Atmega328 that is triggered from a compare event of the TCNT and the value that is set, will the counter TCNT start counting again or rather, keep ...
0
votes
1answer
34 views

AVR ATtiny1634 - PB3 as Input and Watchdog Timer

I'm quite a beginner in AVRs and this is my first project soldering the microcontroller and programming it on board. I know the ATtiny1634 QFN might not me the best micro for a beginner, but ...
1
vote
3answers
122 views

How to access GPIO pins on Atmega with memory mapping?

I'm programming the Atmega328P in embedded C. I'm going to use 16 pins for turning on LEDs, and I have to use PORTB, PORTD and PORTC for this. I would like to just iterate a pointer so I can turn them ...
1
vote
1answer
112 views

AVR ATtiny1634 - Programming Issue

I've have already used Arduino as ISP Programmer to load codes to Atmel chips like ATmega328p and ATmega8 quite a few times without any problem. On my last project though, I decided to use an Atmel ...
0
votes
1answer
62 views

How to get started with AVR Microcontrollers? [closed]

I have an AVR ATMega32A Microcontroller, a Programmer that supports my microcontroller, a breadboard and some electronic stuff ...
0
votes
2answers
33 views

TXC 9C-11.2896MAAJ-T XTAL Type

For the purposes of configuring an ATmega324A for use with an XTAL, is the TXC 9C-11.2896MAAJ-T considered to be a low power crystal oscillator or a full swing crystal oscillator? Please see page 39 ...
0
votes
1answer
50 views

ATMEL STUDIO: avrdude.exe: ser_open(): can't open device

I just followed all the instructions to set up Atmel Studio on a new computer for the ATmega2560. Bare in mind that I have already had Atmel Studio installed on another computer where it worked fine, ...
0
votes
1answer
80 views

Perf board parasitic capacitance fries microcontroller?

Recently one of my mirocontrollers fried in a project on a perf board. Eight of the outputs are PWM, and aside from the power lines, there are no other outputs from the MCU. The PWM frequency is 40 ...
0
votes
2answers
21 views

What is IDC connector pitch on a USBAsp?

I am planning to use a USBASP programmer to program one of my boards, and I want to use a fitting receptacle on my board. I fail to find the exact pitch that the USBAsp's IDC connector has (as I ...
0
votes
0answers
35 views

How to connect an SPI angular sensor (AVAGO AEAT-9000-1GSH0) with RS485 transceivers to an AVR microprocessor?

I need to connect an AVAGO AEAT-9000-1GSH0 angular sensor to an ATMEGA32U4 processor. I designed two versions: one using IC-s, one using resistors. I do not now witch of my two designs is better (or ...
0
votes
1answer
32 views

AT90USB1286 not detected by Windows Device Manger

I'm working on a controller for a USB-C keyboard. I understand USB is a very complicated protocol, and USB-C even more so, however luckily enough there's a ton of open-source projects that aim to ...
0
votes
0answers
33 views

Timer/Counter Compare match event fired on next clock tick

I'm using ATmega2560's timer-counter3 to count external pulses. I need to switch some output pin to logical 1, wait for some amount of input pulses at T3 pin and then immediately disable output. I've ...
0
votes
3answers
85 views

Tone output with AVR

I've got a keypad hooked up to an ATMega168 and its supposed to play various tones depending on the button pressed while the respective key is held down. I'm generating these tones by alternating the ...
2
votes
3answers
174 views

Gosh darn PORT structs on AVR

To my shock, Atmel has restructured the way they do port addressing in the ATtiny-avr-one series (1616 for example.). I am writing a function that takes in a pin and a port and sets the corresponding ...
1
vote
1answer
39 views

xmega-E5: exposed pad

I'm drawing my own CAD library for the ATXMEGA*-E5 devices. At page 69 (Seztion 35.2 32Z) there is the drawing of the package 32Z (5x5mm 32-lead VQFN). I cannot find any information about the ...
0
votes
2answers
99 views

What does _SFR_IO8(0x04) do? AVR

I'm trying to write a program in assembly to toggle the on-board LED of the Arduino MEGA2560. To do so I just have to indicate the direction of the pin (13 in this case which is PB7) as output and ...
6
votes
7answers
2k views

Compress .hex file for micro-controller [closed]

I am currently writing a program in AVR Studio, here is the build *Memory Usage : * ...
0
votes
2answers
94 views

Can I use C++ stl in avr-gcc?

I have implemented C++ queue in my codes, those I run on my PC. Now I'm programming an ATmega128 micro-controller to implement a .c code. Can I use that ...
-1
votes
2answers
50 views

Interfacing 4*4 keypad avr-gcc [duplicate]

I have this function for a 4x4 keypad: ...
0
votes
0answers
30 views

Help With ATMega32 Fuses

I decided I wanted to learn Atmel Studio to be able to work with all their microcontrollers problem being i'm trying to use a brand new ATMega32 with default fuse settings and an external crystal ...
0
votes
0answers
39 views

Can I use PWM to control the speeds of more than two motors separately in ATmega32A?

Can I use PWM to control the speeds of more than two motors separately in ATmega32A ? The latest thing I could do is controlling The speeds of two mototrs using fast PWM mode in counter 1 with ...
0
votes
0answers
66 views

AVR ATMEGA168 UART behaving strangely

I am new to AVR and microcontrollers and I am trying to get the UART working correctly on my Atmega68 chip. When I transmit data from my chip my PC terminal program receives them as weird symbols. I ...
0
votes
1answer
52 views

.96 inch TFT with ST7753 and AVR - can't draw individual pixels

I bought this from aliexpress: https://www.aliexpress.com/item/32859042892.html It seems to be a good display, even a bit higher res, than advertised, however, I'm having trouble doing anything more ...
0
votes
1answer
44 views

How to use output PWM in AVR

I have this code to blink an array (8-led) of led one after one: ...
0
votes
1answer
214 views

How to make 1uA consumption on Attiny13a?

I'm measuring my standalone Attinty13a (internal 128kHz) current consumption with li-ion accumulator (3.7v, 220mAh). Here is my schema and code: ...
0
votes
0answers
95 views

ATMega328P - DS18B20 temperature sensor returns incorrect temperature values

I'm using a Dallas DS18B20 sensor to measure temperature in conjunction with an AVR ATMega328P microcontroller (using this AVR C library to implement the code). Unfortunately, the value always returns ...
3
votes
1answer
81 views

AVR diagram of functions calling, ISR and main loop share the same resource

I made a simple diagram of functions calls to illustrate the potential problem which bothering me a little. As you can see, my task_list (which is simple linked ...
0
votes
1answer
62 views

Atmega328p ADC - value keeps returning zero when connected

I'm currently try to connect a DS18S20 temperature sensor to the atmega328p. I have wired AVCC and AGRD to the same power rail on my breadboard as normal VCC/GRD and AREF is not connected. When I try ...
0
votes
0answers
48 views

Strange Clock output on AVR [duplicate]

I have programmed my ATtiny1616 to output the clock on a pin. Here is my reading: Why is there all that ripple? How might I reduce it?
0
votes
0answers
52 views

avr/io.h don't include the appropriate avr/ioXXX.h file

I'm facing a problem on Eclipse IDE that when compiling my project (which has #include <avr/io.h>), the compiler includes ...
1
vote
2answers
51 views

AVR ATMEGA644 print Local time

From this tutorial, I can print local time when I code using codeblock. https://www.tutorialspoint.com/c_standard_library/c_function_localtime.htm I am measuring capacitance by atmega644. I read the ...
0
votes
0answers
41 views

OLED SS1306 displays on one side only when using AVR

I have an I2C 128x64 OLED display here. I've tried using Arduino and everything works flawlessly. Now I'm trying this but just writing in straight-up C code. Majority of the display is garbled up. I'...

1 2 3 4 5 34