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
0
votes
1answer
83 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
54 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
47 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
1answer
28 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
53 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
25 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 ...
0
votes
0answers
27 views

Controlling DC-Motor (60V) from Encoder pulse signals using ATmega88, C-Programming

I have given the following C-Code to test a 60V DC motor with gear box ratio 16:1 and incremental encoder to see if the code calculates the speed by reading the Pulse signal as feedback for ...
3
votes
1answer
78 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
29 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
34 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
81 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
45 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
72 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
152 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
54 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
26 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
139 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
39 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
67 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
62 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
32 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
69 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
60 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
33 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
36 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
92 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 ...
3
votes
2answers
145 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
58 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
42 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
92 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
91 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
134 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
57 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
73 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
54 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
79 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
112 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
88 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
84 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
61 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
39 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
80 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
51 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
216 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
31 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?

1
2 3 4 5
24