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.

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Self programming fails on ATmega2561

We've been programming a custom Board with an ATmega2561 via a serial (RS232) connection for years, mostly without problem. We're using a custom bootloader that is closely based on recommondations in ...
2
votes
0answers
37 views

Is a single Schottky diode adequate to support power-path in a basic USB -> LiPo charging circuit?

I'm working on a hobby project based on the ATmega32U4. I'd like to be able to power the device by USB or LiPo battery. I was looking at the schematic for the LilyPad ProtoSnap Plus and saw a diode ...
1
vote
1answer
46 views

333mV Current transducer - how to read it and protect the Atmega328p input

i have this CT current transducer: it outputs 333mV at 5A full scale. I'm planning to use it in my house/office in order to detect if a load is switched on or off, but i'm worried about how i can ...
-1
votes
1answer
90 views

Breathing effect using a shift register

I want to create a breathing effect but I have 16 RGB LEDs. I also want to arrange these 16 LEDs in a square. I plan on using a 74HC595 datasheet shift register and an Atmega32 MCU. I have figured out ...
1
vote
1answer
82 views

Can't connect to Atmega328p with avrdude

I'm trying to connect to a pretty old Atmega328p that was sitting on a solderless breadboard for years. I'm using a TinyUSB programmer that also powers the MCU. When I try to connect to it, I have the ...
0
votes
2answers
32 views

Problem interfacing stepper motor with Atmega 32

I have been trying to interface a bipolar stepper motor with an ATmega32 controller using AVR assembly, but it just keeps clicking without movement or just move back and forth in the same step. Here ...
0
votes
3answers
151 views

How does one program for first time and reprogram microcontrollers that are mounted to a PCB?

Arduino Unos and Microchip Curiosity Nanos are for prototyping and easy and ready to program, but now I am struggling to find the resource material that would detail taking the chip off the breakout ...
2
votes
3answers
113 views

Can I control IRFZ44N Mosfet directly from 5V microcontroller?

I know that IRFZ44N is not a logic level Mosfet, but I need it to control only 12v 1.2A (14.4W). Can I control it by applying only 5V on gate from an atmega microcontroller? I checked the datasheet ...
1
vote
2answers
55 views

Reading the input from a relay's NO output over 12 meters

I want to read the input from my driveway gate beam using an Atmega32. I know the gate beam is powered with 12V DC which I get from the driveway gate motor's battery. The beam also has three outputs, ...
0
votes
2answers
40 views

What is max input voltage on ATMega4809 (datasheet versus Atmel-ICE programmer)?

Background I have my ATMega4809-pf hooked up properly and I am able to program it via my Atmel-ICE programmer. Problem However, when I read from the chip using the Microchip Studio it warns me that my ...
2
votes
1answer
80 views

Noise on I²C when bit-banging but not with built-in I²C (ATmega328PB)

I'm working on bit-banged I²C for the ATmega328PB. I've been seeing a lot of noise (ringing and cross-talk) on the lines but thought it was just my test probes, etc. However, when using the MCU's ...
0
votes
1answer
68 views

Wrong device signature for ATmega32A-PU while burning MightyCore bootloader

I'm trying to install the MightyCore bootloader into an ATmega32A-PU chip but I'm getting the following error when I press the "Burn bootloader" button on Arduino IDE: ...
3
votes
1answer
208 views

Why don't certain pins on PORTC on the ATmega164A/324Pa/644PA/1284P work?

I want to use the PC2 pin on my ATmega164-1284PA series of microcontrollers and it's not working no matter what I do. I even wrote a minimal test case that only sets it as an output and toggles the ...
2
votes
1answer
102 views

How debug atmega2560 with pickit 4? (Arduino mega board)

I owned a brand new pickit 4, and I'm trying to get a debug session working. This is what I did: 1. Cut reset pin from the USB-UART programmer. There is a Reset EN pad that can be cutted off to ...
1
vote
0answers
84 views

7-segment display communication

I have attempted to solve this problem making kmaps for the binary counter, mux and decoder however I'm getting stuck on the making them all talk to each other bit, I am using a ATmega32L and a ...
1
vote
1answer
178 views

Programming ATMEGA328P with an USB-UART adapter

I'm having trouble using this USB to serial converter to program my ATMEGA328P. Let me show my steps below: I have bootloaded the ATMega328 using the Arduino as an ISP. I then used the Arduino as an ...
0
votes
2answers
86 views

Powering Ardunio Nano with external 5V Schematic

This is the continuation of my (previous question). In that, it is suggested that powering a Nano with an external 5V is not a good method. My team told me to put an option in any way. I found this ...
0
votes
1answer
76 views

ATtiny84a SPI communication disabled following chip erase

I am attempting to serially program an ATtiny84a using an ATmega645a. I am able to enter programming mode and read the device signature bytes, but after issuing a chip erase command, the ATtiny stops ...
0
votes
1answer
110 views

ATMEGA328PB and ATMEGA328P: can be exchanged on a design?

I'm working on a PCB design where I was using ATMEGA328P. Right now it is impossible to get it from any distribuitor, and I think that the best option is to replace it with an ATMEGA328PB (PCBGOGO ...
0
votes
0answers
119 views

How to get ATMEGA328P (28 pin) in Proteus?

I am newbie in Proteus, when I searched for Atmel ATMEGA328P, I found only 32 pin part available, when I used "component search engine" I found the 28 pin part but could not import it (I got ...
2
votes
2answers
147 views

When to switch to 4 layer PCB

I'm currently designing my own 60% per-key RGB mechanical keyboard. (60% means the keyboard only contains 60% of the keys of a regular keyboard.) I've laid out the components, routed the switch scan ...
0
votes
1answer
38 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 ...
0
votes
1answer
119 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
56 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 ...
0
votes
1answer
57 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
54 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 ...
0
votes
1answer
84 views

ATmega32U4 I/O Pin Alternate Functions

I am using an ATmega32U4 as a master with 2 slave ADCs (AD7739), ADC1 and ADC2. The two ADCs are identical. The SS, SCLK, MOSI, and MISO for ADC1 correspond to ports PORTB0,1,2, and 3 respectively, ...
0
votes
1answer
30 views

ATmega 2560, additional software serial port advice

I am trying to make a project with an ATmega 2560 microcontroller. I need 5 UARTs, but the microcintroller has only 4 of them. I want to connect 4 of them to RS485 and 1 additional software serial to ...
3
votes
1answer
104 views

Why is my 5 pin switching headphone jack shorting out my circuit when I plug a 3.5mm phono cable into it?

I have an STX-3790-5N 3.5mm stereo switching headphone jack in my circuit. http://www.kycon.com/Pub_Eng_Draw/STX-3790-5N.pdf The intention is for the audio signal to flow from the ATmega328 pin 9 to ...
0
votes
0answers
35 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
42 views

ATmega644P programming via STLINK v2

I want to upload program/debug ATmega644P using STlinkV2(JTAG). Is it possible? Which IDE support make debug ATmega644 using STlinkV2.
0
votes
1answer
121 views

Atmega-328 as an alternative to the Arduino Uno

As I am building on, every day I learn something new. Today I learned that I really don't need a full-size Arduino (Uno/Nano.) All I need is an ATmega328(/p) chip microcontroller. At this point, I ...
0
votes
0answers
67 views

Standalone Atmega328p AU PCB noise problem

I am using my standalone atmega 328p au custom PCB for switching 220v contactor via relay module. PCB contains 5v smps power supply, triac based SSR for indicators and output pins which connects with ...
0
votes
1answer
96 views

PC recognizes keyboard pcb only as FT232R usb UART but doesnt see atmega32a behind it

I made my own pcb design for mechanical keyboard. When I wanted to test it, both mac and windows system recognize only FTDI ft232rl chip on pcb but not atmega32a behind it that controls whole keyboard....
1
vote
2answers
158 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 ...
0
votes
0answers
72 views

Crystal for ATMEGA32u4 Not Working

I have been trying to make a watch circuit, but have ran into the issue of how to setup the crystal. I believe it is the crystal that is the problem because when I messed with the crystal contacts the ...
0
votes
1answer
32 views

ATmega - magnitude comparator for hardware PWM

Does someone has an information how hardware PWMs of ATmega, etc.. compare registers with timer/counter value? Is there inside a true 8bit magnitude comparator for every channell or is there some ...
0
votes
0answers
42 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
480 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
0answers
63 views

Programming ATMEGA1284p on internal 8MHz without caps

I'm trying to burn a bootloader on a standalone ATMEGA1284P without using caps or an external 16MHz crystal, just with a 100nF cap between GND and 3.3V VCC. I am using this bootloader from maniacbug. ...
0
votes
1answer
138 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
57 views

Unpowered ATmega in a powered circuit

I have an application involving an ATmega328 which may be powered while the ATmega is not. The circuit is an led driver (operating at 24V) which can be controlled either by potentiometers or digitally ...
0
votes
0answers
118 views

ATMEGA1284p and RFM95 sleep current around 35µA: can it be reduced further?

In my project, I am using an ATMEGA1284p processor in the TQFP-44_10.0x10.0x0.8P package as well as a RFM95 LoRa module. For the low-power mode, I'm using the rocket scream low-power library: https://...
1
vote
1answer
42 views

How to debug a non working atmega88pa ciccuit. programmer can't connect

I am trying building a Mutable Instruments Branches module which includes a atmega88pa. I am trying to connect the programmer but can't get a connection going (I've tried the programmer with another ...
0
votes
1answer
128 views

Blink Code ATmega2560 not working in Proteus

I am running a simple blink program in an ATmega2560 with external 8MHz crystal. When I run it in Proteus, the LEDs do not blink. Refer to my files below. This is the simple blink code. I just add ...
0
votes
1answer
141 views

ATMEGA328P Max Clock Speed Without Divider

Does anyone know what the max clock speed of the ATMEGA328P is, without the clock divider? I know that people have been able to overclock the 328 to 30 - 50 Mhz, but I haven't found if those are using ...
0
votes
1answer
50 views

Setting prescaler for 8MHz external oscillator in Atmega2560

I am relatively new in Atmega MCU's (too used with graphical interfaces). I am using an external clock with 8MHz in my Atmega2560. My problem is that I cannot use UART communication with PIC18->...
0
votes
0answers
43 views

Feather 32u4 too much current draw

I am trying to build a battery-powered application using the Feather 32u4. I need a timer to trigger every 120 seconds (although Timer1 with it's 8 second limit would suffice for the beginning), thus ...
1
vote
0answers
33 views

ATMega32u4 Timer code not working

The following timer code running on a 8Mhz ATMega32u4 should toggle the onboard LED every second, and calling the ISR code manually does so. Yet, the ISR does not seem to get called. Could anyone ...
0
votes
0answers
178 views

STM32 F103 GPIO software toggling too slow for 20 microseconds state change?

I'm designing an ESC for my hobby project but I got stuck on current chopping. I want to toggle a pin every 20 us and want to use a timer interrupt for this. On the oscilloscope I can see that timer ...

1
2 3 4 5
24