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
1
vote
1answer
60 views

Protecting a 3.3V board against a 5V programmer

I'm designing a home automation board with ATmega328. For programming it I'm exposing the appropriate pins via the AVR ISP interface. Now some ICs of the board allow only up to 3.5V power. What are ...
0
votes
1answer
34 views

How to send a text message from an ATMEGA328PB microcontroller [closed]

I am looking to make a project with an ATMega328PB microcontroller. I want to tell when my mailbox has been opened and to send some sort of notification. I was thinking of use a GSM module to send ...
0
votes
0answers
44 views

SPI MOSI line only hits 1.2V for speeds above 500kHz and below 4MHz (3.3V logic)

I'm trying to drive a ST7789 TFT display (datasheet) with an ATTiny-416, but for some reason SPI fails at speeds above 500kHz. So far I've had these results: 500kHz: pass 666kHz: fail 1MHz: fail ...
0
votes
0answers
27 views

Implementing UART driver with Interrupts and DMA - UART_RXC ISR is executed only first time a character is received

I am using ATxMega 32E5 and my current task is to rewrite existing RS485 driver and use DMA to save in my case valuable cycles (the speed is going to be multiplied by 8x going from 230k to 2M baudrate)...
1
vote
1answer
48 views

Attiny13 affects USBtiny programmer logic voltage levels

I wanted to port a simple program from an Attiny85 to the cheaper Attiny13. To make sure everything would work properly I started trying to upload a simple blink program to the MCU but could not get ...
1
vote
4answers
142 views

Do I need voltage regulator?

I power my board with 5V and I am working with ATMEGA8, so I don't need to reduce the voltage. Do I still need voltage regulator for stabilization? And if I do, would this work? I used here 5V ...
0
votes
0answers
47 views

Read specific line faster

i am working on a mp3 player project for hobby use,i use atmega644pa @12Mhz and use fatfs library via spi.Avr has no enough sram to the long file names so I tried to store long file names in a text ...
0
votes
2answers
46 views

How to calclate Rb value for NPN transistor?

Here is a part of my schematic. K pin from LCD is connected to NPN transistor. A pin is connected to Vcc, 5V. Base is connected to uController. It is Atmega16. 5V supply. I am using BC547 transistor ...
0
votes
1answer
44 views

Semaphore in FreeRTOS doesn’t work

I am a newbie to freeRTOS and I was trying to learn about semaphores,I am using ATmega32a microcontroller, the plan was to create 3 tasks each is blinking the same led for some time with different ...
1
vote
1answer
44 views

ATtiny USB data interrupt

I'm trying to use an ATtiny88 to detect data on a USB line. I have an USB data connection going to a hub and a secondary system and I want to use the ATtiny to detect if any peripheral hardware has ...
1
vote
0answers
50 views

Power supply for ATmega16

I am working with Atmega16 mc and it works on 5V. Also my project consists of IR sensors, LCD and few diodes. All of those works on 5V. I am wondering how can i power this board. I read somewhere i ...
0
votes
0answers
28 views

Why enc28j60 is not responding to another enc28j60?

I interfaced enc28j60 with atmega328p. Then I connected the enc28j60 board1 using ethernet cable to my laptop. I have checked the transmission and reception over the ethernet and it worked. I can sent ...
2
votes
1answer
45 views

How to make hex file for attiny402 microcontroller using winavr

I have written a code in the 'Programmer's Notepad' of winavr. But when I went to make the hex file, I didn't find the attiny402 microcontroller in 'mfile'. Can anyone help me? Now, what should I ...
1
vote
0answers
27 views

How to use ATMega USART in synchronous mode using XCK pin

I'm working on a project with ATMega64 and I have a problem with one of the USART interfaces which is going to work in synchronous mode. when trying to send a test data like: ...
0
votes
0answers
31 views

Why aAtmega328p not responding to USBasp programmer? [closed]

I am using USBasp programmer to program my atmega328p. I am using fuses L : E7, H: D9 , E : FF. I have replaced a atemga328p on my board since it was not detecting on programmer. After replacing the ...
0
votes
0answers
31 views

AVR Interrupt: LED kept blinking and won't stop

Lately I realize I am still a newbie, when you can't blink a freaking LED properly. It's kinda sad. I try to simplify this LED code to the simplest form possible, and it still won't work properly. ...
0
votes
0answers
129 views

AVR LED running too fast!

My LED is running too fast while asleep, and it runs as expected when it's not asleep. Strange!! What is the problem here? ...
3
votes
4answers
1k views

What is meant by 'On-chip 2-cycle Multiplier' for AVR microcontroller?

While checking the datasheet of ATMEGA 32 I have found a feature called 'On-chip 2-cycle Multiplier'. Can anyone explain to me what's that and what's the advantage of it?
1
vote
1answer
37 views

Where is Interrupt Vector Table stored in ATmega32A?

Given that Atmega32A has three types of memory : 1) SRAM. 2) Flash (Program memory). 3)EEPROM. In which section the Interrupt Vector Table is stored ?
0
votes
0answers
64 views

ESP01 in real life

I'm trying to use esp01 modules to read data from an 23c through i2c and send it through wifi. I have some serious problems with the esp01: The only pair that can be used for i2v are gpio0 and gpio2. ...
0
votes
1answer
41 views

How to implement Software PWM on an AVR on a timer ISR? Failing to grasp the maths for this

Say I have a timer running on an atmega328 8MHz like so: ...
2
votes
1answer
19 views

Variable length timer match outputs on AVR?

Is it possible to set the length of time until the next timer match output while you're in a timer match interrupt?
0
votes
0answers
21 views

Trouble using KS0108 graphical LCD

I run program that I was wrote in CodeVision for ATmega32 and I used a KS0108 graphical LCD. I was design the schematic in proteus. when I run the simulation I got this error: Non-existant pin [] ...
1
vote
1answer
71 views

Is battery enough to power the Atmega328, display, HX711 [closed]

I create electric scales that will work with small scales. Microcontroller: Atmega328 Display: SSD1306 Load cell + HX711 I want to charge this device using USB. To do this, I will use TP4056 (...
0
votes
0answers
13 views

Why Enc28j60 is not working sometimes?

I interfaced enc28j60 with atmega328p. I used enc28j60 module buy from a electronic shop and i have two module. I programmed the atmega328p using avr studio and tuxgraphics tcp/ip stack. I connected ...
0
votes
2answers
83 views

AVR MCU Interrupt toggle a LED problem with 100 extra toggle

I am playing around with an AVR MCU. I am having trouble toggling a LED. It's being toggled faster than I have expected. It should be toggling at 500hz, but it's up to 600hz and not very stable. I ...
0
votes
0answers
12 views

ENC28j60 MAC filtering is not working?

I want to send data over udp communication from enc28j60 to my windows pc. I used tuxgraphics udp/ip stack for programming. For monitoring the packet I used wireshark software and also serial ...
0
votes
0answers
31 views

how to modify my AVR so headphone jack does not shut off speakers

Being a bit deaf, I like to use my headphones while my wife listens to the speakers. Unfortunately my Samsung TV does not have an audio out plug. There is an optical audio out but it cannot be used at ...
1
vote
1answer
25 views

Question about ADC prescaler register in ATMEGA32A

As you see in datasheet of Atmega32A, it says that the bits ADPS of register ADCSRA are controlling the Prescaler of the ADC clock by dividing the frequency of external crystal on some division factor,...
0
votes
0answers
70 views

Esp32 (Arduino Core) And Led Control Library issue

I am using esp32 devkit v1. My project is to make music reactive leds, the sound input of which is given through the "dabble" app on my smartphone plus turning leds on based on set distance from my ...
0
votes
1answer
28 views

in AVR, if i use .ORG 0 with the main program , where is the interrupt vector table and .INCLUDE file data go?

I am studying AVR from the book "the AVR microcontroller and Embedded system by Mohamed mazidi" and "atmega32A data sheet" in the book, it puts samples of cade which start like this ...
0
votes
1answer
34 views

MCP40821 DAC not responding to AVR

I'm trying to interface with an MCP40821 using SPI from an AVR. Using these pin maps: ...
1
vote
0answers
31 views

Relocation in MPLAB IDE X

I'm writing a bootloader for ATXMEGA256A3U. At page 14, Table 7.1 of the datasheet I know the bootloader address start at 0x20000. Using AtmelStudio I set in the linker option the following ...
0
votes
1answer
35 views

Porting from iccavr project to Atmel studio problems with Atmega2561 8 bit MCU

I'm currently in the process of having to port a large project from ICCAVR known as the imagecraft IDE to Atmel Studio 7.0 and have had great difficulty trying to get the Atmel build of the project ...
2
votes
0answers
66 views

Atmel AVR ADC Inconsistent Sampling Time

I'm running an ATMega1284 at 20MHz. I've set the ADC up in free running mode as such: ...
0
votes
0answers
50 views

Unexpected result reading pin on clock rising interrupt

What I try to achieve is a simple one-way communication between two MCU's (ATTiny85's to be exact) at 16Mhz. This is just a start, to figure out it can be useful, very basic and needs to be very basic....
0
votes
1answer
43 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
66 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
63 views

ASCII value error during communication (UART) in AVR

I am trying to implement following program in Atmega328P. ...
0
votes
0answers
44 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
66 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
65 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
57 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
34 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
76 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
54 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
101 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
42 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
92 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
72 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 ...

1
2 3 4 5
34