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
0
votes
0answers
81 views

Ethernet on ATtiny85 [closed]

How would I go on about sending a HTTP request with an ATtiny85? Is there a module to do it easily? I've got an RJ45 Ethernet jack for input.
1
vote
1answer
105 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 ...
2
votes
3answers
566 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 ...
0
votes
1answer
50 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?
0
votes
1answer
36 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 ...
0
votes
1answer
34 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 ...
1
vote
1answer
54 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 ...
0
votes
1answer
91 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 ...
0
votes
1answer
54 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 ...
1
vote
2answers
55 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 ...
0
votes
1answer
50 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 ...
0
votes
2answers
46 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 ...
3
votes
2answers
111 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 ...
0
votes
0answers
45 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 ...
0
votes
1answer
33 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 ...
0
votes
0answers
41 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 ...
1
vote
0answers
59 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 ...
0
votes
1answer
84 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 ...
0
votes
1answer
38 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 ...
2
votes
1answer
62 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 ...
0
votes
1answer
59 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 ...
0
votes
0answers
30 views

Analog comparator ATMega164

I am using an ATMega164 chip and the circuit below On D5 and D6 I have connected the pins of a DC motor, which has to spin whenever the read voltage drops under a threshold. I read in the datasheet ...
0
votes
1answer
55 views

RTC with ATmega 32 & ds1307 showing the year completely wrong

I have this project to build a clock / calendar with ATmega and ds1307 showing it on a 20*4 LCD (LM044L). I have implemented the code showing the time correctly, i have initialized the RTC too, but ...
0
votes
0answers
104 views

Bit-bang I2C implement on DS1307 and Atmega328P problem

I currently implement I2C bit-bang for Master Arduino (AVR) to Read/Write to Arduino Slave using Wire.h and DS1307 RTC. My bit-bang i2c work perfectly with Arduino Slave read 8 bytes without ...
0
votes
2answers
43 views

AVR "OUT" function. addressing port without constant

I am currently writing some assembly code that needs to address different I/O ports at certain times in my code. For example, at one point I may want to address PORTD4, and at another point I may want ...
0
votes
1answer
52 views

Missing 1 bit shift Bitbang I2C Atmega328p

I implement bit-banging I2C on Atmega328P and met the problem when the Master receives data from the slave. I'm in depression in debugging this code since I found no problem. Master Write work ...
0
votes
2answers
71 views

Powering SN754410 with 5V, controlling with 3.3V

I want to use a bunch of SN754410 chips to control some electromagnetic valves. MCU is ATmega64A running at 3.3V. I'll be using 5V for powering SN754410 (VCC1). According to the datasheets low-level ...
-1
votes
1answer
70 views

Serial AVR programming and doubts

I currently have Attiny85 , attiny45 , atmega328 , 8051 MCU . I want to program them in a chipless method ( which doesn't use any intermediate chips to burn program or bootloader ) - this is like a ...
0
votes
1answer
76 views

Where to find documentation for definitions for AVR programming in C

I wonder if there is a documentation for AVR (I am using C to program) definitions like PIN5_bm or SLEEP_MODE_PWR_DOWN, or if I ...
0
votes
1answer
20 views

ST instruction of avr in microchip stuio (avr studio) nor working as expected

I am trying to understand indirect addressing in avr and tried the following code : ldi r31, 0x28 ldi r26, 0x2c ldi r27, 0x00 st X+, r31 when r26 and r27 are ...
1
vote
0answers
74 views

What Is the Best Way to Debug an AVR Microcontroller Using the Command Line?

My AVR programming method is usually as follows: compile the source code with avr-gcc: ...
0
votes
1answer
71 views

Unnexpected Behaviour From Software UART On ATtiny84A AVR

I am trying to implement a software UART for the ATtiny84A, as it does not come with a UART out of the box. The following is an example of the UART TX: ...
0
votes
2answers
106 views

`sizeof` Function Is not Working as Expected With AVR Microcontroller [closed]

Observe the following example code (Microcontroller used: ATtiny84A): ...
2
votes
1answer
69 views

Configuring the Ports of an AVR Microcontroller for SPI Use

I am trying to configure the an ATtiny84A for use with SPI, but I have some confusion with what Is being said in the datasheet for configuring the ports. The ATtiny84A has, what the datasheet calls, &...
0
votes
1answer
118 views

Going below the bottom of the stack in ATmega328P

I'm working with an AVR based project and just have one curiosity. The ATmega328P has total 2kB of SRAM. The lowest address of the stack can be 0x8FF. Now suppose the stack pointer is at 0x8FF. What ...
14
votes
2answers
792 views

Avr-gcc using repeated addition instead of MULU instructions

I recently compiled some C++ code for the ATmega1284P in Atmel Studio and was analyzing the timings of some routines using my scope. To my surprise, a loop I thought I had optimized was taking longer ...
0
votes
0answers
27 views

AVR Assembly - Operations with two 8-bit registers in 16-bit two complement negative values

I have this code in which I try to multiply the given number by 4. I have two variants and that is that it is negative and positive, but it doesn't work for negative values, you don't know why? ...
0
votes
1answer
94 views

Why 10-pin and 6-pin ISP?

I have another curiosity question: Why is there a 10-pin AVR ISP connector and a 6-pin version? It seems that the only difference is that the 10-pin version uses the extra pins for a heap more ground ...
0
votes
1answer
57 views
1
vote
2answers
154 views

Need help fault finding a custom PCB

I am designing a custom circuit board for a CG scale test instrument to find the centre of gravity for model airplanes. My design is based on the model here: https://github.com/olkal/CG_scale and it ...
3
votes
6answers
647 views

Why is my low dropout voltage regulator Diodes AP7370 burning up?

I'm building a LED driver using Diodes AL8871Q IC to power a XHP70 LED powered from a 4 series protected Lithium battery pack, integrated on the board it has an Attiny85. I plan to use the Attiny85 to ...
0
votes
1answer
28 views

Problem or misunderstand of ADATE bit on ATTiny45

I have 2 buttons connected to pulled-down ADC input. I want to trigger ISR(SIG_ADC) when ADC finishes conversion - this is working. If I start ADC using ...
0
votes
0answers
28 views

Change simulator fuses in Atmel Studio

I have been test the example. AVR1316: Using the XMEGA Self-programming driver on ATxmega128D4 device through the Atmel Studio simulator. The program executed fine but does not modify the content of ...
-4
votes
1answer
210 views

Making a simple calculator with ATMEGA32

I try to create a calculator with ATMEGA32 but it did not work correctly! For example it do operations like this (2/1=0),(5*6=12808),(22+88=12746). I know that something is wrong but I cannot find it ...
0
votes
4answers
84 views

How to determine which connectivity and peripherals are needed in a microcontroller?

This post goes a step beyond my previous question about microcontroller selection here. In short, I am a moving away from AVR for product development and I want to stick with popular manufacturer uC ...
6
votes
7answers
1k views

Is auto generated projects for embedded system the future?

I'm using CubeMX for auto generate projects for the STM32 micro controllers. I really like CubeMX because it's fits both STM8 and STM32 micro controllers. One thing that I'm wondering about is if ...
0
votes
1answer
72 views

Uncertain of 8-bit vs 32-bit alternatives to AVR32 [closed]

I was browsing a distributor to find options for simple 8-bit and 32-bit RISC uCs and came across AVR32. After some searching on the web, it seems that AVR32 is a bit dated and possibly not a good ...
0
votes
0answers
26 views

APDS-9253 reads all data registers as 0

I'm trying to read data from an APDS-9253 with an xmega. My i2c bus is working because I'm reading other devices without any problem. From the datasheet it seems at power-up the sensor is not ...
0
votes
1answer
79 views

temp1:12:3: error: 'DDRA' was not declared in this scope DDRA = 0x00; /* Make ADC port as input */

Trying to upload code on atmega328 to display temp but throws me this error : temp1:12:3: error: 'DDRA' was not declared in this scope DDRA = 0x00; /* Make ADC port as input */ ^~~~ Here's ...
0
votes
1answer
50 views

AVR Atmel MCUs with 12bit ADC and ArduinoIDE support [closed]

I am searching for more powerful MCUs than the ATMEGA1284p that I am currently using, in particular I want to have better ADCs and switch from 10 to 12bit resolution. My constraints are the following: ...

1
2 3 4 5
36