Skip to main content

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

SSD1306 display goes out-of-sync only if ATmega328 is reprogrammed

I have ATmega328 directly connected to the SSD1306 Display through I2C. Whenever I power up the ATmega, everything works great and the display works as expected. The problem occurs only when I upload ...
0x29a's user avatar
  • 471
1 vote
0 answers
32 views

Seeking Review and Validation: Minimalist Arduino Mega Circuit Design

I've recently developed a minimalist circuit for the Arduino Mega with the intention of uploading the bootloader via SPI pins and utilizing a USB FTDI chip for programming. Before proceeding further ...
Sooraj R's user avatar
0 votes
0 answers
31 views

Gibberish data with custom Atmega 2560 UARTs

So I have an issue with the UART configuration of my customized uC based on the ATmega2560. To establish serial communication, I'm using the FT232RL chip and the Arduino IDE. I don't have any issues ...
Wyufiyra's user avatar
4 votes
3 answers
582 views

Custom Arduino MEGA crashes ONLY on a specific command when plugging UART-USB converter before main power. Phantom power leaking through UARTs pins

Disclaimer Based on multiple attempts to find the cause of the problem, I have determined that I might be facing a hardware issue rather than a programmatic failure, hence why I am posting this here ...
Daniel Melendrez's user avatar
1 vote
2 answers
47 views

How can I prevent a 120VAC solenoid valve from resetting my ATMEGA328?

I'm using an ATMEGA328 running Arduino code to control a relay which uses a 5V signal to switch a 120 VAC solenoid. I added a flyback diode to the relay which fixed an earlier reset problem, but I'm ...
Jake Nixon's user avatar
0 votes
1 answer
56 views

OLED Libraries interfere with PD6 port manipulation in Atmega328PB

I stumble across an issue which I can't solve in multiple attempts. I'm trying to turn on and turn off an OLED SSD1306 display attached to the hardware I2C on Atmega328PB. The device has button on PD3 ...
lz_linux's user avatar
0 votes
1 answer
25 views

Cannot communicate with MPU-6050 module

I have a custom PCBA (nano shield) with the MPU-6050 accelerometer. The schematic is shown below. I am able to see the device on i2c, but am not able to communicate with the device whatever library I ...
Newbie's user avatar
  • 153
0 votes
0 answers
77 views

ATmega328 experiences freezing or hangs when the ceiling fan is turned on or off

I've been working on a project, but I've hit a snag. Every time I try to turn the ceiling fan on or off, ATmega328 gets hung/freezes. Let me break down the project for you, so you know what's going on ...
mechaTronics Tech's user avatar
-1 votes
1 answer
50 views

ATmega32U4 not appearing on Windows [closed]

I have made a custom PCB that contains a ATmega32u4-AU at its core. I have assembled the board, but when I connect it to my computer I am getting no response from it anywhere on my computer. It isn't ...
Cobalt Gray's user avatar
0 votes
1 answer
44 views

How to increase the Atmega32A input output pins

I’m using ATmega32A to control a system which have a 30 outputs and 30 inputs. The issue is that the ATmega32A have only 32 DIO pin which can be use as input output pins. So how can I increase the ...
abdalla zakaria's user avatar
0 votes
1 answer
31 views

Led blanking while the DIO_Read is LOW and work well while DIO_Read is HIGH

I'm trying to read digital 24v in MCU so I used a voltage regulator to step it down to 5v then I got the 5v to pull down resistor with a transistor like that then I get the V out to the MCU pin which ...
abdalla zakaria's user avatar
-1 votes
1 answer
41 views

Need help for the definition of timer function

I've found below code that belongs to the timer declaration function but the definition is hidden by the author. Can anyone help me to provide a definition for the same? I want this to be utilized in ...
Ramandeep Singh's user avatar
0 votes
3 answers
112 views

Validate my 3V3 power system

My Power System, can someone validate it? I'm not familiar with using the TPS63060. Datasheet can be found at: https://www.ti.com/product/TPS63060 I'm trying to power a ATMega328p-AU + 4 digit 7-...
Mustansir Godhrawala's user avatar
1 vote
1 answer
58 views

ATmega32A pins output issues

I’ve an issue with my ATmega32A in some of PORTC pins. I’m trying to control some LEDs using MCU but I faced an issue with PINC2,3,4,5 as shown in picture bellow. Off state (LED num 3,4,5,6 from the ...
abdalla zakaria's user avatar
0 votes
1 answer
72 views

Atmega16L reads only zeros from flash

I bought a used old pcb that contains an atmega 16L processor, however I suspect that one output pin is damaged, so I want to replace the chip. However the firmware is not available online, so I now ...
wolflu's user avatar
  • 33
0 votes
1 answer
83 views

ATmega328p-A Schematic

I just finished designing my attempt at an ATmega328P-A board, had some trouble understanding how to program the MCU. The manual of the MCU didn't specify really well how, or I just didn't find the ...
dimpanas's user avatar
0 votes
2 answers
76 views

Can I treat the USB controller in the ATMEGA8U2 as seperate from the rest of the microcontroller?

I'm working on a project that runs on a battery, but can be connected to a computer for a serial connection/charging. In the documentation it lists an example of a bus powered USB controller with ...
Elliot Smith's user avatar
0 votes
1 answer
67 views

Designing a temperature feedback loop in Proteus

I am writing a term paper on the topic "Modeling of an Artificial Blood Circulation Apparatus". The task is to design a control unit based on the ATmega128 microcontroller in Proteus ...
Maksim Ponomarenko's user avatar
0 votes
1 answer
113 views

Response partly lost in Modbus RTU over RS485 communication

I have developed a Modbus slave which uses ATMega8A and MAX485. In a new lot of the devices, while testing them on my PC using QModMaster, the response that I get has one byte in front of it, and cuts-...
nottherealfaraday's user avatar
6 votes
2 answers
872 views

What is the function of the comparator in the ATMEGA328p ADC block diagram?

What is the purpose of the comparator here? I understand that it must be a normal comparator that when the positive input voltage is greater than the negative input voltage returns a logic 1 at its ...
Lucio Mazzini's user avatar
0 votes
0 answers
98 views

Alternative IC for ATMEGA

I'm looking for an IC to replace the ATMEGA chip in the following circuit. During operation the MCU applies a voltage to the base of the BJT allowing current to flow through the load. However, when ...
sunra's user avatar
  • 121
13 votes
3 answers
4k views

Why does compiler optimization flag cause function definitions other than main() to break program in AVR ATMega C code?

I am using avr-gcc and avrdude to write programs onto an ATMega8515 micro-controller. I have got the blinking LED program working without a hitch. However, when I started to use interrupts and ...
cornelius's user avatar
  • 255
0 votes
2 answers
64 views

Is 74244 buffer suitable for multiplying data and enable in my Rasberry Pi3 to ATmega128A bidirectional communication?

My Raspberry sends data at baud rate 115200 to 300 remote panels (ATmega128A) through RS485 bus serial communication. Also it sends enable signal (5 V) and receive feedback from the 300 panels at the ...
Ezzat's user avatar
  • 5
2 votes
0 answers
64 views

ATmega88 Brown Out Detection issue

[]I have a designed based on the ATmega88PA-AUR and am having issues with the Brown Out Detection triggering when it should not be and looking for help. The uC is powered at +5V, regulated, and ...
Dan's user avatar
  • 21
1 vote
1 answer
112 views

Programming ATmega using Arduino as ISP

For my systemprogramming class I have to program an ATmega48a µController. At university we're using an avrmkII to program the chips, but as i don't have such a device at home so I figured I could use ...
KlnSdr's user avatar
  • 13
3 votes
1 answer
84 views

MCU working with external crystal oscillator removed [closed]

I programmed my atmega1284p using Arduino as ISP. I set oscillator to 16mhz external crystal. Everything is working fine but when I upload the blink sketch (where I have set led to blink after 1 sec) ...
Kalash Changal's user avatar
1 vote
1 answer
36 views

Cannot upload to Atmega328p twice in a row

I've successfully burned a bootloader to my Atmega328p via the SPI interface, and then used this CH340 and a level converter to successfully upload code to the chip. However, every time I upload code, ...
Gary Allen's user avatar
1 vote
1 answer
53 views

I2C LCD not working on custom board

I'm working on a custom board for a 4 zone greenhouse heater using the Atmega2561. I can program the board just fine, but I cannot get the LCD working over the i2c bus. This does not appear to be a ...
user2583864's user avatar
8 votes
2 answers
819 views

ATmega8515 - odd results when auto-detecting external SRAM

I'm using an ATmega8515 microcontroller for a one-off hobby project. This chip has an external memory interface which can directly address 64 kilobytes of external SRAM. ATmega8515 datasheet. For my ...
Wossname's user avatar
  • 646
0 votes
2 answers
76 views

Is it possible to connect ATMEGA328 to type-C and read data without a USB-TTL converter?

there was a task to create the most compact device with atmega328 on board, but the question arose whether it could read data from type-c without a ttl converter ...
Settings's user avatar
  • 129
0 votes
1 answer
84 views

Atmega88p hangs after I2C (TWI) START condition while trying to connect to SSD1306 OLED display

Hello I am currently trying to use my atmega88p micro-controller to display something on the SSD1306 OLED display. In the attached image you can see my setup to connect the mcu to the display. I ...
Linus S.'s user avatar
2 votes
0 answers
40 views

Understanding and implementing IEEE 1284 with a parallel cable for a Epson Fx-890 [closed]

I'm looking to gain a good understanding of the IEEE 1284 communication protocol and how to implement it for use with an Epson Fx-890 printer with a microcontroller such as the ATMega 644. Can someone ...
Arthur Isnt original's user avatar
0 votes
1 answer
73 views

How to connect BMP390 to arduino? [duplicate]

I have a bmp390 sensor and an official circuit from the manufacturer for connecting it to i2c, but there is a problem, the ...
Settings's user avatar
  • 129
0 votes
1 answer
52 views

DDR_XCK register in atmega328

Page 166 of datasheet of atmega328 shows the use of a register called DDR_XCK. ...
InfiniteLooper's user avatar
1 vote
1 answer
87 views

ATMega328p wakes immediately after sleep

I'm having issues with my current AVR-C project that runs on an ATMega328p. After issuing the sleep command the chip wakes up again immediately. I want to wakeup with an external interrupt, but while ...
Julian F. Weinert's user avatar
9 votes
1 answer
106 views

What does a USB device need to do so that the host device can sleep?

I am using an ATmega32u4 that is connected semi-permanently to a mobile Android device (specifically, a keyboard connected to a phone). While the device is connected and USB is enabled on the ...
Dakkaron's user avatar
  • 879
0 votes
1 answer
95 views

ATMEGA32U2 Schematics Sanity Check

I am not certain if this is a thing, but I was hoping for some members to sanity check the below schematics I have for an ATMEGA32U2. The external LCDs the ATMEGA32 is communicating with are TTL and ...
iMan Biglari's user avatar
0 votes
1 answer
82 views

Page erase and page write using SPM instruction for ATmega328

I have been studying this for ATmega328, I first want to verify I am correct in the following. And then I have question on page write and page erase. ATmega328 has 32K byte flash = 16K words. It ...
Alan0354's user avatar
0 votes
1 answer
100 views

Variable resets to zero when entering an ISR C Atmega 328P

it happens only with "prova", sell, it happens with every variable i try to modify in the Interrupt service routine. The new value remains after exiting the rputine but when entering again ...
Albuereta's user avatar
4 votes
1 answer
641 views

AVR code disassembly - what is this code doing?

I have read and disassembled the code from an Atmel8 microcontroller from a faulty oscilloscope. This is the start routine: ...
DrD's user avatar
  • 199
6 votes
4 answers
1k views

Can I do assembly programming using the kit I bought or do I have to get another setup?

I started out just want to play with my granddaughter when I bought the kit, but now that I am reading the datasheet of ATmega328, I want to get deeper and I want to try some assembly coding just to ...
Alan0354's user avatar
9 votes
4 answers
2k views

Is it ok to set the unused I/O pins of the ATmega8A to input and connect all of them to ground

I'm still new to microcontroller, I don't know if this is already have a document about it. I'm using the ATmega8A for my project and I only need 12 out of 23 I/O pins of the microcontroller, which ...
Sairext Irkaris's user avatar
1 vote
2 answers
150 views

What is the most common way to program ATmega328? Through SPI or USART or others? [closed]

I am learning ATmega328 and plan to design it into my custom circuit. I need to know how I should set up to loan programs into the ATmega328 so I can set up the hardware to do that. Is it through SPI ...
Alan0354's user avatar
0 votes
1 answer
70 views

Clarify the names in the Assemble code of ATmega328

I just started learning this. I have a few questions I want to clarify. Here is the red lined copy of the relevant part for my questions. What port and bit to write to enable SPI? I never really get ...
Alan0354's user avatar
0 votes
1 answer
67 views

Verify logical shift left << from AVR Assembler document

I am learning the logical operators, I want to confirm the doc is not correct. This is the copy from the doc: Symbol: << Description: Binary operator, which returns the left expression shifted ...
Alan0354's user avatar
0 votes
1 answer
70 views

What is WGM22:0 and WGM2:0 for ATmega328?

I have question what is the difference between (WGM22:0 = 1 or 5) and WGM2:0 = 3 as shown in image with red lined? My understanding is WGM22:0 is really WGM2(2..0) which is 3 bits. What is WGM2:0? ...
Alan0354's user avatar
0 votes
1 answer
78 views

What is "force output compare" of ATmega328?

This is the link describing Force Output Compare. I don't quite get it. Does it mean I can force the output of the comparator to say "comparator match" even when it is not? ATmega328 online ...
Alan0354's user avatar
5 votes
1 answer
1k views

High-temperature microcontroller

I am looking for a microcontroller to replace a Teensy 4.0. The problem is that the Teensy doesn't cope well with high temperatures. I realise that seeking recommendations for specific products is ...
Juno's user avatar
  • 93
1 vote
1 answer
281 views

AVR ATmega328P wrong fuses set

I was programming on the AVR ATmega328P using the USBasp programmer. I uploaded the blink example but the LED was not blinking. Thus I went on changing the fuse bits to the one Arduino has. During ...
kam1212's user avatar
  • 595
0 votes
0 answers
37 views

How to program PUDE PUOV DDOE DDOV for ATmega328

I have been reading data sheet of ATmega328 on how to override the ports to alternate function in p90 Table 14-2. I keep seeing these names, but I cannot find how to write to them. Thanks
Alan0354's user avatar

1
2 3 4 5
26