Questions tagged [atmega]

ATmega is a family in the AVR series of Atmel microcontrollers. It is the main microcontroller of the Arduino prototyping platform. Please specify the specific part number in your question.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

ATmega16 and 74HC245

I would like to know if a 74HC245 can drive the input pins of an ATmega16. The bus transceiver opens the data flow toward the ATmega16, which has the port set as input. So far, the ATmega16 drives the ...
  • 185
0 votes
1 answer
28 views

Basic USB Endpoint0 configuration error ATmega32u2

I've been trying to make a simple custom usb device class for a project based on the Atmega32u2. I have been trying to get a usb device enumerated, but I can't get endpoint 0 properly configured. I ...
  • 13
0 votes
2 answers
41 views

Conflicting data in ATmega32u2 datasheet: PLLCSR PLL Control and Status Register

I'm trying to make a simple USB breakout board based on the ATmega32u2 and I've come across some conflicting information in the datasheet. Can somebody with experience confirm or deny what is said in ...
  • 13
0 votes
1 answer
63 views

Why is ENC28J60 getting as hot as 65°C?

I am working on an Ethernet adapter and I am using ENC28J60 as SPI slave an ATMEGA328P as SPI master. The adapter works fine, but ENC28J60 really gets hot, measured with infrared thermometer and it ...
  • 103
0 votes
0 answers
53 views

Simulate DFU on ATmega32A

I bought an ATmega32 to put it on a DIY keyboard kit. I uploaded a USB bootloader using Arduino as ISP and now I'm waiting for the keyboard PCB to mount the ATmega32A and flash QMK firmware on it ...
  • 1
1 vote
1 answer
29 views

Could an AVR ISP connector be reused to add SPI-Interfaced memories without programing the controller?

I have no previous experience designing AVR-Compatible hardware. I have a board which uses an ATMega 2560 and has a SPI bus which is already used by a SD adapter. After some datasheet reading, I ...
0 votes
0 answers
18 views

Shared control at power-on-reset

I have a D Flip Flop, whose /set line is controlled by an ATmega, and its output (Q) is connected to the /WAIT line of a Z80 processor. Of course, I need that at power on, the Q output is set HIGH to ...
  • 185
0 votes
1 answer
89 views

I designed an ATmega32U4 circuit, will it work?

Here is my schematic, drawn in EasyEDA: The battery is the Sparkfun lithium-ion battery. I based the battery charger on the official one. Will this work, or do I need to make some changes?
0 votes
1 answer
37 views

ATMEGA32 TQFP-44 PORTA Pin Order

Is there a logical reason why all the ports of the ATMEGA32A TQFP-44 count anticlockwise from 0 to 7 in an anticlockwise direction round the chip except for PORTA that counts clockwise, that leaves ...
  • 309
1 vote
0 answers
55 views

Can't flash microcontroller through JTAG

I designed a board and added a JTAG interface to program the built-in ATmega32 16U via an Atmel-ICE. I have already measured the individual pins of the JTAG with a multimeter and there is also 4.5 V ...
2 votes
4 answers
642 views

How are local varibales stored on Atmega

When the ATmega starts there is only the Flash Program. Global Variables are stored at startup into the RAM and have a fix address to be accessible? How is this process called? It must be a really ...
  • 29
0 votes
0 answers
23 views

FT231XS + Atmega328p not able to program via UART

I am building a board that's based off the Arduino nano but having some trouble programming it. I ripped the chip off a spare Arduino nano, so it already has the optiboot bootloader flashed. For some ...
2 votes
2 answers
109 views

How do I measure a pulse width using the ATmega328P interrupts and timers?

I am using an ATmega328P MCU with an 8 MHz internal oscillator. I need to measure the pulse width of an incoming pulse. The frequency of this pulse is approximately 500 Hz. Once every 2 ms, one pulse ...
0 votes
0 answers
38 views

Can't read RGBC data from TCS34725 RGB Sensor using AVR and Atmega16

For my project, I need to read the RGBC data from a TCS34725 RGB Sensor using the Atmega16 and AVR. It should be able to classify between the colors Red, Green, Blue and Clear light. Therefore I made ...
0 votes
0 answers
44 views

ATmega8 answers and is programmed, but the program doesn't work

I'm having trouble with ATmega8 programming. I'm using the USBasp programmer and the PlatformIO IDE and everything goes smoothly, AVRDUDE doesn't show any errors, but the program doesn't work on the ...
0 votes
1 answer
36 views

Remote reset circuit for an Arduino activated by a Raspberry Pi [duplicate]

I have a board running at 5 V and I want to be able to ground the ATmega reset pin from a Pi so I can reset the ATmega on demand. I need to make the reset voltage Pi safe. My first thoughts were to ...
  • 23
5 votes
1 answer
129 views

Why does my ATmega crash when a function is present (not called) inside an interrupt?

This is strange behavior and I am very curious. It's a fairly large project, but basically this section of code is designed to quickly save all of the user settings on power down. There's plenty of ...
0 votes
0 answers
39 views

Changing External Crystal of ATMEGA2560

In new project I'm working on I changed 8MHz external crystal of ATMEGA2560 to 16MHz Now UART and I2C are not working. What all changes needs to be done to make this work?
0 votes
0 answers
41 views

AVR adc multichannel isn't reading properly

this is a code I made to get reading of 3 ADC channels , I am using the ADC interrupt auto trigger , the first channel works well but after that the readings are weird , I am using potentiometer , so ...
0 votes
1 answer
58 views

How to send 16 bit data to MCP4802 from ATmega328p (Arduino Nano)

Referencing ATmega328p manual, I only can send 1 byte at time. However MCP4802 specs say that MCP4802 wish to get 2 bytes (4 info bits + 8 data bits + 4 don't care bits). I have written Arduino code ...
1 vote
1 answer
163 views

Differences between ATMega2561 and ATmega2560

Because of sourcing issue we're replacing an ATmega2561 with an ATmega2560 in a BGA housing on a little adapter PCB. The most obvious difference is the number of Pins. The ATmega2560 has 36 pins more ...
  • 2,959
12 votes
1 answer
414 views

TQFP and VQFN on same footprint: good idea or bad?

In order to ease supply issues, I am considering an overlapping footprint for the TQFP-32 and VQFN-32 packages of ATmega48/88/168/328 CPUs. The two packages have the same pinout. It's a commercial ...
  • 8,668
0 votes
0 answers
67 views

Why is my code working in proteus but not when burned into chip?

I am using atmel chip and I have a problem with the code, I guess. Trying to make automatic light system. I am working with two IR sensors that should detect a person entering and leaving the room. I ...
  • 57
2 votes
2 answers
162 views

How to do a factory-reset on an AVR micro-controller?

I'm programming an ATmega32 chip, and have set some bits as 1 in some DDRs and PORTs. In case I forget what bits I had set to 1, is there a way to set all the register bits to a value(1 or 0) that was ...
  • 317
0 votes
0 answers
51 views

ATmega2560 fast enough?

I want to drive a servo with the ATmega2560. I'm wonder if it can handle the 10 kHz encoder at full speed and the 3-phase chopper the driver has to operate (runs at 12 kHz). Or do I need to start ...
0 votes
1 answer
109 views

ATSAMD21 doesn't seem to start, device not found/detected

I just finished assembling my PCB with an ATSAMD21G18A and was super thrilled to flash it with my program. Sadly Atmel Studio tells me that it can't find the device. I tried to debug the whole thing, ...
4 votes
1 answer
746 views

ATmega 2560 is getting hot controlling MOSFETs

I'm controlling 8 N-channel MOSFETS with the following circuit diagram. I have 8 of them connected to IO pins 20 - 27 and all works fine apart from overheating the microcontroller. When I set the ...
  • 209
1 vote
2 answers
105 views

Problems with the CD4021 shift register on NES controller

I'm trying to use an ATmega328 to interface with a NES controller, but I'm running into some issues. The ATmega328 is programmed to pulse the latch pin, wired to the 4021's P/S pin, high for ~10 μs, ...
  • 11
5 votes
1 answer
476 views

Push-pull mosfet gate driver (using BJT transistors)

I'm trying to build a MOSFET driver, I am new in electronics, and specially in controlling MOSFETs. Please take a look at my schematic, are there any mistakes or recommendations? I'm trying to create ...
2 votes
1 answer
134 views

Unbrick my ATmega 8

It looks like I've bricked my chip (ATMEGA8-16PU) by setting the WTDON fuse and flashing an empty loop as the main program. I suspect that the chip constantly goes into reboot every ~60 ms, which is ...
0 votes
0 answers
39 views

Programming with AVRDUDESS without response

I am trying to program an ATmega64 which has a bootloader on it but the RS485 transceiver has been designed with the D, !RE, and Tx pins shorted to GND so it can never respond. AVRDUDESS never ...
  • 1
0 votes
0 answers
28 views

RP400N501A DC-DC regulator on PCB not outputting correct voltage

I have created a PCB that is powered by a 3.7v lipo, and has a 5v boost converter and then a 3.3v linear regulator. The reason for the 5v boost converter is that I have to drive some LEDs at 5v, but ...
0 votes
1 answer
58 views

Simple 3.3 V to 12 V voltage level translator on data bus

I would like to build a nixie tube clock with a unique idea. The idea is that the clock queries the accurate time (it respects the DST too) from my home server. So the clock does not require any ...
0 votes
2 answers
99 views

Why is this DC motor control software not working? [closed]

I want to control a DC motor with an Atmega16. I have connected a motor driver to port B pins PB0 and PB1. When I try this code, it works great. ...
  • 57
0 votes
1 answer
101 views

ATMega328p with SSD1306 and DHT22, help in code

Hi I am trying to make a project that uses DHT22 (Temperature & Humidity Sensor) and SSD1306 (OLED Display) with the ATMega328p. I want the OLED Display to be normally off and should turn on for 5 ...
  • 121
0 votes
1 answer
102 views

Is it possible to program Atmega8 on a development board designed for Atmega16?

I'm trying to load a hex file to Atmega8 but it seems impossible to do it directly on a normal bread board so I'm planning to buy this development board. It is the only board that my local store can ...
0 votes
0 answers
26 views

What are the steps to program an ATmega8 using only USBasp and breadboard? [duplicate]

Sorry to ask this again but this one post seems not to answer my question as I'm literally a complete beginner on programming microcontroller. Power on failed; cannot communicate with target chip ...
1 vote
3 answers
418 views

Power on failed; cannot communicate with target chip error eXtreme Burner

I checked Electronics Stackexchange and other sources, but I can't figure out what's wrong with my set-up. Some say that I need to check my connections, which I've done many times, checking all the ...
0 votes
2 answers
66 views

Which voltage stabilizer can be used to power the ATmega 328 and the BMP280 sensor?

I have a connection diagram of the BMP280 to an ATmega328, but I do not know which voltage stabilizer to put on the input of the ATmega328, so that it would be powered like an Arduino from 3 to 9 V, ...
3 votes
2 answers
482 views

ATMEGA328P reset circuit, not pulling down fully

Attached is the schematic of a reset circuit. When I press the reset button, the voltage on the reset pin is 2.5 V. Rmoving R13 naturally solves the issue, but I'm unclear as to why the ...
1 vote
1 answer
92 views

MOSFET is not turning on in bidirectional power switch circuit

I am designing an MPPT circuit using bidirectional power switch(as load switch)having two PMOS connected back to back and both the MOSFEts are driven by BC847 transistor that is being driven by a ...
0 votes
2 answers
168 views

Timer Interrupt not working as expected on ATMEGA808/1608

After countless of tries, I still didn't figure, why I cant get it to work... I'm using an ATMEGA1608 (Datasheet) with the following code. Pin D6 has a LED connected. ...
  • 1,772
0 votes
1 answer
158 views

Flashing an ATMega microcontroller using a USB Connection

I'm trying to get into embedded system design and have been hung up on what hardware is required to use a USB connection to communicate with the microcontroller (and therefore, flash it). Here's what ...
0 votes
2 answers
150 views

How to test if a ATMega16u2 is working

I have designed a custom ATmega16u2 board, however, I cannot connect to it using USB. All connections seem to be correct, and I have checked that the voltage regulator is working, regulating it to 3....
1 vote
1 answer
130 views

ATMega32u4 minimum system clock for USB 2.0

I am trying to cut down the power consumption for an ATMega32u4. The datasheet says, for USB 2.0 it needs an external clock, which it uses to generate a 48 MHz clock by multiplying the external clock ...
  • 727
-2 votes
2 answers
72 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 ...
  • 57
0 votes
2 answers
60 views

ATmega324PB, reading registers through SPI, the meaning of sending 0xAA

I have an electronics board that uses an ATmega324PB microcontroller that uses SPI communications to communicate with another device on the board. In a coding function that reads a register through ...
  • 569
0 votes
2 answers
177 views

External RC oscillator fuse programmed instead of external crystal fuse

Is there anyway to revive an Atmega8A? avrdude says avrdude: error: program enable: target doesn't answer. 1 ever since I ...
  • 1,000
0 votes
1 answer
196 views

Mysterium Keyboard ATmega32a malfunctioning. "USB device not recognized."

I tried sourcing all the parts for this keyboard. I soldered everything up and when I plug in the keyboard I immediately get an error message "USB device not recognized": My first though ...
1 vote
0 answers
46 views

Ardunio Errors with ATmega644A Fastled (MCUDude Mightycore)

Good Morning, I am trying to compile a ardunio project with ATmega664A using the MCUDude MightyCore plug in while using the Fastled library. I have used this before with ATtiny167 with Spence Konde ...
  • 97

1
2 3 4 5
25