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
22 views

THD and SNR of XMega32 family microcontroller

I am trying to figure out the noise (voltage) introduced by the internal ADC of the ATXmega32E5 in terms of SINAD, and therefore using SNR and THD. By analyzing the datasheet of the above mentioned ...
g.mezzina23's user avatar
0 votes
1 answer
72 views

Schematic design review of a custom macropad with an ATmega32U4

This is the first time I've made a "more complex" PCB. Before I buy all the parts it would be nice if someone could check my design. ATmega32U4: Datasheet
Aterox's user avatar
  • 11
0 votes
0 answers
40 views

ATmega8a serial communication problem

I've written a C++ application to transmit a character from my PC to ATmega8A and from it to my PC once again using USB to serial cable. I've attached LCD HD44780 to the microcontroller to display the ...
Coffee Break's user avatar
2 votes
2 answers
305 views

Detecting a break condition over UART on ATmega328P

I'm implementing a protocol which begins with an 88 µs break (low) and uses an 8-N-1 configuration. The latter is easily set with UCSRnC, but is there a way to configure the UART hardware to detect ...
19172281's user avatar
  • 673
0 votes
3 answers
129 views

ATmega - How to decrease the time of jumping into PCINT ISR

I need to jump into PCINT ISR as fast as possible after signal appears on pin. Currently it takes about 20 clock cycles. I would like to decrease it to 10 cycles. I am using C. Is there a way? I found ...
user avatar
1 vote
1 answer
49 views

Setting external clock in ATmega16A

I am confused about how to configure an ATmega16A microcontroller to use an external clock instead of the internal one. I do not know whether I should set up the last bit as 0 or 1 for CKSEL in ...
Muhammad Hamza Farooq's user avatar
0 votes
1 answer
58 views

Crystal frequency for ATmega16A MCU

I am using a crystal of 16 MHz with an ATmega16A MCU. As it is known that the crystals usually do not give us proper square wave and also the frequency is not that exact. So when I am enabling a 16 ...
Muhammad Hamza Farooq's user avatar
-1 votes
1 answer
77 views

Crystal oscillator input power

I have seen many circuits in which they have connected the crystal oscillator with two capacitors as a clock for the microcontroller like atmega 16A. The first question I want to ask is whether the ...
Muhammad Hamza Farooq's user avatar
0 votes
0 answers
36 views

My LCD connected to ATmega16 is not displaying anything

My 16 x 2 LCD is connected in 4 bit mode on the lower nibble to an ATMEGA16. Here are the connections: VSS - GND VDD - VCC V0 - POTENTIOMETER RS - PC6 RW - PC5 E - PC4 D4 - PC0 D5 - PC1 D6 - PC2 D7 - ...
Saeed Bowman's user avatar
0 votes
2 answers
68 views

Driving a 12 V DC pump using Atmega16 Microcontroller and a 2N2222a transistor but it is not working?

I am implementing a system using an ATmega 16, a 12V/ 0.4mA/4.8W DC water pump, a 2N2222a transistor, a 1N4001 diode, a resistor and, a 12V Power Supply. However, whenever I test the circuit with the ...
Saeed Bowman's user avatar
0 votes
0 answers
61 views

Modbus receiving same message as sent

I am having a problem when communicating with a Modbus slave. I have made a circuit with the translator shown in the picture. UART2_RXD and ...
magn4258's user avatar
0 votes
2 answers
51 views

Driving 10ch outputs with 5V AVR

I use a 5V AVR (ATmega1284p) to measure some data. Depending on the data I would like to switch one of 10 outputs. Each of these outputs should have a LED (as an indicator and for debugging purposes) ...
Eimer Z.'s user avatar
9 votes
3 answers
552 views

Possible ESD damage on UART pins between nRF52840 and ATmega1284P

I have devices operating from 2S Li-ion battery (max 8.4V). They consist of 2 PCBs - the first one contains a 3.3V voltage regulator and an ATmega1284P, while the second one has MDBT50Q-U1MV2(nRF52840 ...
st4n13y's user avatar
  • 91
4 votes
3 answers
305 views

Are ATmega48/168/328 suitable for automotive applications?

I'm trying to figure out if it's ok to use ATmega48 in a homemade project involving some safety-related aspects with moving vehicles. (the project will be a control board for excavator joysticks) ...
floppydisk's user avatar
1 vote
1 answer
60 views

Uploading sketch to ATMEGA328 via FTDI with some pins set to HIGH logic

I recently changed my PCBA design so that the digital pins 4, 5, & 6, are set to HIGH logic by default (so I can use some switches on these inputs). However, now when I upload a sketch to the ...
Newbie's user avatar
  • 153
0 votes
0 answers
31 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 ...
ozw1z5rd's user avatar
  • 185
0 votes
1 answer
33 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 ...
daannn's user avatar
  • 13
0 votes
2 answers
44 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 ...
daannn's user avatar
  • 13
0 votes
1 answer
70 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 ...
salocinx's user avatar
  • 103
0 votes
0 answers
62 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 ...
Sbraaa's user avatar
  • 1
1 vote
1 answer
32 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 ...
Borg Drone's user avatar
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 ...
ozw1z5rd's user avatar
  • 185
0 votes
1 answer
118 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?
BuffiloBingo's user avatar
0 votes
1 answer
43 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 ...
Jay Dee's user avatar
  • 319
1 vote
0 answers
58 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 ...
Not ASMR's user avatar
2 votes
4 answers
646 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 ...
jento's user avatar
  • 29
0 votes
0 answers
28 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 ...
rkrishnan2012's user avatar
2 votes
2 answers
192 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 ...
turqay mammadov's user avatar
0 votes
0 answers
45 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 ...
nowsqwhat's user avatar
0 votes
0 answers
53 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 ...
Einaudi's user avatar
0 votes
1 answer
41 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 ...
Nikm's user avatar
  • 23
5 votes
1 answer
144 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 ...
rspaudio's user avatar
0 votes
0 answers
43 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?
Sarath K's user avatar
0 votes
0 answers
46 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 ...
Omar A. Abdelazim's user avatar
0 votes
1 answer
69 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 ...
ojacomarket's user avatar
1 vote
1 answer
220 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 ...
kruemi's user avatar
  • 2,984
12 votes
1 answer
432 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 ...
jonathanjo's user avatar
  • 10.6k
0 votes
0 answers
80 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 ...
cerouno's user avatar
  • 57
2 votes
2 answers
199 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 ...
Somanna's user avatar
  • 317
0 votes
0 answers
54 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 ...
Alan van de Glind's user avatar
0 votes
1 answer
145 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, ...
Felix Kunz's user avatar
4 votes
1 answer
761 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 ...
Ricky's user avatar
  • 209
1 vote
2 answers
113 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, ...
SomeGuy's user avatar
  • 11
5 votes
1 answer
602 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 ...
Osoian Marcel's user avatar
2 votes
1 answer
148 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 ...
user324050's user avatar
0 votes
0 answers
41 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 ...
Tjelo's user avatar
  • 1
0 votes
0 answers
30 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 ...
Kyle Kingsberry's user avatar
0 votes
1 answer
62 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 ...
Nabukudurriusur's user avatar
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. ...
cerouno's user avatar
  • 57
0 votes
1 answer
118 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 ...
dracarys's user avatar
  • 121

1
2 3 4 5
25