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
2
votes
0answers
28 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
28 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
28 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
75 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
37 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
70 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
150 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
52 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
28 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
22 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
103 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
37 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
56 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
50 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
55 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
30 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
60 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
52 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
28 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
34 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
32 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
76 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 ...
2
votes
2answers
127 views

Moving Data, Bss and heap memory to external SRAM Atmega2560

This is my first question here, sorry if I miss something. I’m using an Atmega2560 as main processor for my project but I’m running out of ram so I have connected an external 64 KB (64 x 8) SRAM to it....
0
votes
3answers
57 views

ATMEGA resets c program when starting and stopping reading data from a PC

I'm sending data from an ATMEGA 328 to a PC and I have an incrementing line counter for each block of data I send. (4 integers) When I start and stop the receiving program on the PC, it resets the ...
0
votes
1answer
38 views

Can you program Atmega32M1 with UART?

I have been reading datasheet over datasheet and seems to find nothing about this. I know I can use SPI_A for both bootloading and programming the atmega32m1. But can I use UART? And should I go with ...
0
votes
3answers
88 views

Low resistance current limiting on GPIO pin

I'm trying to find a good solution for protecting the GPIO pin of an ATmega32u4 in short circuit conditions. Normally I would just use a simple resistor but that isn't the best option for this use ...
0
votes
1answer
84 views

Choosing the right Brown-out level

I'm working with ATmega1280 (Datasheet link) Currently I'm using the internal RC-oscillator at 8MHz I'm also using Telit LE910 for sending data that can take up to 2A (from the Telit hardware user ...
1
vote
3answers
122 views

Can a raspberry sink 5V

I'm using a raspberry pi to program an atmega328p. During my tests I was using 3.3V to power the avr and it was pretty straightforward, whenever a program is about to be written I pulled low pin 1 (...
0
votes
1answer
56 views

What to consider when choosing a crystal

I'm working on a Datalogger project power by a battery that needs to take sensor measurements and broadcast the parameters to a server. The power source to the CPU is 3.3Vcc from the battery. The ...
1
vote
2answers
56 views

BODLEVEL Fuse Coding

I'm using ATmega1280, and I have a question about this BOD table: what is exactly the meaning of "Min. Vbot" and "Max. Vbot"?
0
votes
0answers
53 views

Can't uploading on Atmega328P-MU after a while

I am having a problem to upload sketches via Arduino IDE on the Atmega328P-MU chip on a custom board. Shortly after I have mounted the chip on the board everything works fine. I can upload a ...
0
votes
0answers
78 views

I2C pull up arduino mega 2560 issue

We're communicating Arduino Mega 2560 I2C with MCP4728 and INA219 MCP4728 address are 0x60, 0x61, 0x62 and INA219 address are 0x40. With 10k resistor as pull-up we're getting signals as below for SCL ...
0
votes
0answers
65 views

ATmega168 TQFP vs. 28DIP - different behavior after programming

I have developed a program for ATmega168 using Atmel Studio 7.0 and Atmel-ICE as debugging interface. The development was done on a 28DIP package, since it's easy to work with it on a breadboard. ...
1
vote
2answers
111 views

Why would you right shift 8 bits for 8 bit register?

MCU: Atemega328P Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf (Page 143 - USART) Note: I am beginner :) Using the BAUD ...
1
vote
2answers
84 views

Tact switches only work once

I am trying to do a digital clock using an Atmega8A, LCD display (2x16) and four tact switches. Key number 1 is connected to pin PD2, number 2 to PD3, number 3 to PB6, number 4 to PB7. When you press ...
0
votes
2answers
76 views

How do I get started in C using avr-gcc on the mega2560 [closed]

I've program the arduino using tools before (on windows) and using C++ but never with c++ without tools nor done it on linux I have a (at)mega2560 and want to do a simple blink program like the below <...
0
votes
0answers
53 views

How to replace AVR _delay_ms() with timer

Good day. I need problem with replacing _delay_ms() bultin function with timer. MCU: Atmega644@16Mhz My code (simplified): ...
0
votes
0answers
58 views

Temperature it's not read well on microcontroller

I'm trying to build a thermometer using the ATMega164 microcontroller, but my problem is that it's not displaying temperatures correctly over 32 degrees, what it's the problem? This is how the setup ...
1
vote
0answers
34 views

Atmega328p-pu (arduino bootloader) processor freezes/resets randomly

I have updated the schematic of my project. The board for this was produced and all components are soldered to the board. Now I am trying to make a "n20 gear motor" move using the motor ...
1
vote
1answer
58 views

Pin change interrupt won't toggle OFF my LED

Friendly Note: I am a beginner :) Microcontroller: Atmega328p LED = PORTB0 BUTTON = PORTB1 Aim: To have the button generate a pin change interrupt request which runs an ISR that toggles PORTB0 ...
0
votes
1answer
44 views

ADIF is set first or ADSC is cleared first?

I am using an ATmega8A for ADC conversion. I start ADC conversion by setting ADSC bit and wait till it clears by hardware to detect the end of conversion. I saw some people checking the ADIF bit to ...
1
vote
1answer
208 views

How can I make a led blink at different frequencies upon button switch?

I'm trying to make a led blink at 3 different frequencies, upon successive keypresses. My problem right now it's that it's only blinking 2 times and I don't understand why. D6 is LED, D4 is the test ...
0
votes
1answer
30 views

Use attiny as an external watchout timer

I like to failsafe an Atmega8 mcu despite having its own WDT. does it make sense that if I add an attiny to the circuit to check if each loop is taking a specific time, if not reset the Atmega chip?
-5
votes
3answers
198 views

Only green display but temperature it's not showed there

I'm trying to build a graphic display thermometer in Proteus, with an LM35 sensor using the ATmega 164 microcontroller. My problem is that the program that I've built it's only starting the display(it ...
0
votes
1answer
52 views

How to use reset pin of ATmega64

I have an Avocent SwitchViewDVI (4SVDVI10) KVM that looks to be run by an ATmega64 microcontroller. Every now and then the KVM locks up and I need to reset the unit by pulling all USB power sources ...
1
vote
0answers
43 views

What does Configure RESET Port Pin as wire-AND mean?

I am studying to use the ATmega328P in debug mode and this sentence in the datasheet is confusing especially the term "wire-AND". Link to Datasheet-https://www.sparkfun.com/datasheets/...
0
votes
0answers
28 views

Atmega88P ADC not working

I have an Atmega88P (default 1 MHz clock) and I'm trying to have a LED blink and to regulate the luminosity of another one using the potentiometer. For the first LED I used TIMER/COUNTER0 in CTC mode ...
3
votes
2answers
150 views

ATmega: Can one determine if an address is program memory or data memory?

On an Atmel ATmega1284 (or any of its AVR cousins), is there any way to determine at compile time or at runtime whether an address that is passed to a function belongs to program memory space or data ...
2
votes
2answers
68 views

How to store the last counting value in EEPROM in ATmega8 after power failure

I written a program to store the last counting value according to ATmega8 datasheet. but it didn't save the last value. The counter variable went to zero after power failure. Please check the ...
1
vote
0answers
54 views

Why can't I connect an external clock oscillator to an ATMEGA64A-AU?

I've decided to change my crystal oscillator for one of those smaller (and also expensive-er!) SMD clock oscillators on ATMEGA64A-AU. I've found this image on the web, which seems right: So I built ...

1
2 3 4 5
24