Questions tagged [atmega]

ATMega is a family in the AVR series of Atmel microcontrollers. This is the main microcontroller of the Arduino prototyping platform. Please Specify the specific part number in your question.

0
votes
2answers
66 views

Frequencies in atmega (uC)

I want to use an atmega328p with nrf24l01 + wireless module and communicate it with an arduino nano with nrf24l01 +. My question is this, if I use different frequencies in the microcontrollers, will ...
1
vote
0answers
77 views

Can't manipulate array with atmega8

I am quite new to AVR programming and I am currently having some troubles with arrays. I am trying to write an Arduino code that will be run on a Atmega32u4. The goal is to communicate with a AX12-A ...
0
votes
1answer
102 views

Resistor between GND and + 5V in Arduino

I design a board based on ATMEGA328P (as in Arduino UNO). Now I am busy creating a power line. My controller will be installed on the electrical panel, so I need to provide a reliable, noise-resistant ...
0
votes
1answer
100 views

Bit rate of uart communication

I have a setup which communicates between PC(windows) and Atmega2560 using UART. On PC side I am using Pyserial. From the PC I am sending a paragraph of text byte-by-byte to Atmega2560. The UART ...
1
vote
1answer
71 views

Creating chained digital current loop

I need to send some digital data and power for long distance (around 60 meters) using only 3 wires. Data speed is low, something like 100bps is enough, 1000bps would be perfect (12.5Bps and 125Bps). ...
3
votes
1answer
467 views

Using Atmel Studio 7 to program Arduino Uno

I will like to use AS7 IDE to program the Arduino board, for start Im using Arduino UNO with ATMEGA328P-PU chip. Im using Windows 10 professional First I used the Arduino IDE in order to run/...
0
votes
1answer
45 views

Different I/O pins of same PORT of ATMEGA8 not providing exact output [closed]

I have written code to switch ON/OFF some LED light connected different I/O pins of same PORT (i.e PORTD) of atmega8 microcontroller. This process is performed using android app by sending different ...
1
vote
2answers
70 views

SPI between ATmega32 and ATmega328 is not working

I have been trying to accomplish connecting ATmega32 and ATmega328 using SPI Hardware connections: ...
0
votes
1answer
69 views

Have I bricked my ATMEGA3328p by setting

I was playing around with setting the "system clock prescalar" (CLKPR). I'm now in a situation where I can see that the clock is 244.9KHz, using my logic analyser and the "Clock output on PORTB0" ...
0
votes
1answer
87 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
1
vote
2answers
165 views

What is the application of capacitor between Vcc and GND [duplicate]

This is a schematic mo ATmega328P used circuit. It has paralleled two 100nF capacitors between Vcc and GND. (C8 and C9) What is the function of this two capacitors and why they are paralleled?
1
vote
1answer
428 views

AVR ATMEGA328p Blinking Example

I wanted to test a simple blinking script on my ATMEGA328p. The breadboard setup (tested and works fine). But the LED does not blink. I probed the voltages across the board and they are showing up ...
3
votes
2answers
242 views

SPI Flash Memory with ATMega1284

I have connected a SST26VF064B 8Mb flash memory IC to an ATMeag1284 as shown in the following diagram. My plan is to talk to it using SPI. Note that all capacitors in the schema are 100nF. When ...
1
vote
1answer
90 views

AVR - strange communication between ATmega8A and bluetooth module

I'm using ATmega8A-PU AVR microcontroller, and HC-05 bluetooth module on a breadboard. What I'm doing here, is to connect to BT module from my mobile phone and toggle the LED state by sending ...
0
votes
1answer
64 views

LCD module not initializing

I've got a project where I need to use an LCD module, so I started pondering around with one (1602A). So far I've wired it up with my microcontroller which is an Atmega168PA and written an ...
3
votes
2answers
469 views

How to test a CPU watchdog on board?

The watchdog of an ATMEL ATXMega128 should have been enabled with fuses. It triggers a reset, if the timer was not reset within the configured time span. I want to be sure, that it is enabled and ...
0
votes
0answers
182 views

ATMega168 UART weird characters

I'm learning AVR programming using this book I was able to run and get output using the code provided along with the book. I use Proteus to simulate the output, since I don't have controller in hand. ...
0
votes
3answers
216 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
88 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 ...
0
votes
1answer
69 views

DMX receiver 40V signal

I am creating a DMX receiver circuit. The dmx that is received from a controller (USB DMX dongle) is converted via a transceiver (SN75176BP) to a signal which can be understood by an ATMEGA328P. I ...
0
votes
2answers
141 views

ATmega 32 Clock Frequency Issue

I'm currently using ATmega32 device with external clock speed of 16 MHz . the problem when i use a delay of for example 16,000 ms in the software, it actually delays only a 1000 ms in actual world. I ...
0
votes
2answers
96 views

Atmega 8 on Arduino Uno

For a uni project I am tasked with programming embedded C onto an ATMEGA 8 uC, and there aren't enough development boards for everyone to use at uni, so I have an ingenious solution. I have several ...
1
vote
3answers
1k views

Increase memory of an ATmega32

I bought an ATmega32 IC recently, but now I found out the program I wrote in Atmel Studio reports an error due to an overflow of memory. It is 134.1% over the recommended memory of this chip. Are ...
2
votes
1answer
702 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 ...
-3
votes
1answer
171 views

need c program for 5 minutes timer [closed]

i am building a project for a cycling bath in which the motor goes up and down. the micrlimit switch senses up & down position. once switch is activated motor cuts off and timer starts. after 5 ...
0
votes
0answers
46 views

chaning fuse bytes in stimuli file in atmel studio simulator

I'm writing a stimuli file for debugging a code wrote for atmega168PA. In this stimuli file I want the lower fuse byte to be set automatically so I don't have to do it manually every time. I know that ...
0
votes
1answer
69 views

Why PINxn with pullup reads zero when nothing is connected to it?

Consider the following C-program: ...
0
votes
2answers
2k 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 ...
0
votes
1answer
64 views

Mitigating unknown error in power analysis of ATMega328P microcontroller

Setup: Arduino Uno (ATMega328P Microcontroller) running inline assembly instructions using asm statements. Global interrupts disabled. Pin 13 (PORTB5), DDRB5 designated as output used for trigger ...
-2
votes
1answer
88 views

What command is sent from AVRDUDE to an AVR programmer for programming ATmega8

I have implemented an IoT ATMEL AVR Programmer based on protocol stk500, and I successfully connect with it wirelessly and program any ATMEL AVR Programmer through Arduino IDE, My Question is: I need ...
-1
votes
1answer
171 views

How to achieve positional servo control with an Atmega328P?

I am trying to drive my SG90 servo using the timers on the Atmega329P using phase correct PWM. I have set up my motor well enough that it rotates, but I cannot get it to stop - the servo motor just ...
-6
votes
3answers
184 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
142 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
100 views

Atmega168 interrupts not working

I am trying some simple programs to test my microcontroller, but I am having trouble with the first test program: blinking an LED using interrupts. I'm using an Atmega168A-PU. Here is my program: ...
0
votes
1answer
56 views

Single Button Power Switch and Mode Selector

I am currently creating an embedded project and would like to know what you all think is the best way to proceed. My setup at its most basic is an ATMEGA328P, a simple momentary pushbutton, a ...
0
votes
3answers
59 views

ATmega328p TQFP and unconnected pins, what is it the best practice?

I'm designing a board based on ATmega328p in TQFP package. I'm not using all the ports, so, for example, ports from PC0->PC5, ADC6 and ADC7 won't be connected to anything. Can I left them unconnected ...
0
votes
1answer
58 views

Help with Buck Converter Charge circuit

I've the following schematic for a buck converter charger circuit. This is getting power from a 10Watt Solar Panel and charges a 7AH 12V Sealed Lead Acid battery. I'm controlling the BC817 with PWM ...
0
votes
1answer
71 views

Extract numbers from String on ATMega168

I try to separate and parse two numbers out of a string, one is a float and one is an int. So I do this... ...
0
votes
2answers
276 views
0
votes
2answers
240 views

Using a 16MHz crystal with an atmega328, it works only if I remove the two capacitors connected to the crystal

I am using a 16MHz crystal with an atmega328. I added two capacitors to the crystal as usual. Everytime the capacitors are attached, avrdudee does not recognize the atmega. Once I remove the ...
0
votes
1answer
117 views

Powering Atmega, DAC and Bluetooth in Car

I'm looking for a proper power supply schematic which would fit my needs and would have all required protections (overcurrent, overvoltage, reverse current, etc) for use in car. I want to power Atmega ...
0
votes
3answers
103 views

Can I power 100 ATMega328 in parallel?

I'm in the napkin-sketch phase of a project that will be ~100 custom devices in a big mesh. Each device is an ATMega328P on a custom PCB with 16-40 'mini' neopixels. I plan to power the whole ...
0
votes
2answers
107 views

atmega8a-pu PORTC not working in 3v3

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

Timer 1 (16 bit): Why is overflow interrupt sometimes missed?

Initialization of timer 1, the 16 bit timer on the ATmega328: ...
0
votes
1answer
270 views

Atmega4809 Asynchronous USART doesn't trigger data register empty interrupt - iom4809.h error

TLDR ATmega4809, mis-labelled ISR in iom4809.h. How can I define an ISR without using these mis-labelled predefined values from iom4809? Using the ATmega4809 Xplained Pro eval board, I'm setting up ...
0
votes
1answer
745 views

BMP280 sensor (i2c) and c library

I'm writing software (for ATMega32) that reads pressure from Bosch BMP280 sensor. I'm using I2C bus. I have found this library: https://github.com/BoschSensortec/BMP280_driver and I have a question ...
8
votes
1answer
160 views

Unexpected Atmega16 response over UART

Unexpected Atmega16 response over UART Brief problem summary I have flashed an Atmega16 with code that should result in the Atmega16 sending back whatever character I send to it via a terminal. I ...
0
votes
1answer
307 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 ...
2
votes
2answers
293 views

Crystal oscillator on custom ATMega2560 board is at the wrong frequency

I have designed a custom board using an ATMega2560. The board works fine when configured to use the internal oscillator. The board stops working when I configure it to use the the external 16MHz ...
0
votes
1answer
138 views

Use of C1 in Arduino Mega schematics?

Please open schematics of Mega. Can anyone explain why Cap C1 is used here? C1 is connected to RESET pin of ATmega2560. Also, ATmega16U2 pin 13 is connected to the RESET pin of ATmega2560. I am just ...