Questions tagged [atmega328]

The ATMega328 is the chip that is the heart of the Arduino Uno. It is popular also as a chip to use to create your own board. Since it is available in the through hole version, it can be placed on a breadboard easily for circuits.

Filter by
Sorted by
Tagged with
0 votes
1 answer
213 views

Two-Wire Interface (TWI) Frequency and SMBus Compatibility

Have I understood the ATmega328P datasheet correctly regarding the TWI clock frequency? From §21.5.2 Bit Rate Generator Unit, the TWI clock frequency is calculated as follows: Then solving for TWBR: ...
tim's user avatar
  • 699
2 votes
1 answer
76 views

Interrupt takes longer than expected [closed]

I am trying to write a delay function in C, which should take 0.5 seonds then carry on. I am aware that there are libraries for this purpouse, I want to make it myself. #include <avr/interrupt.h>...
ibroketheinternet's user avatar
1 vote
0 answers
145 views

the buzzer stops sounding after a few seconds

Sorry, I'm not fluent in English. I beg your help I made an arduino uno project where the buzzer only turns on for 2 seconds after the light turns on. Even though the light is still on I want the ...
Fanesa's user avatar
  • 11
2 votes
2 answers
594 views

As a novice, how do I program my Atmega328p?

I bought a board which the above MCU is the atmega328p. Since I haven't used atmel MCU before, now it's a bit confusing. Are the ATMEGA and STM32 programmers not universal? What programming methods ...
Tessie Swfit's user avatar
0 votes
1 answer
86 views

Save Watchdog ISR Return Address in EEPROM

If the WDT ever fires, from the ISR I save some info in EEPROM for later diagnostics before I drive the reset pin. Stack size, heap size, etc. It might also be useful to know where the code was when ...
Eric Nelson's user avatar
0 votes
1 answer
67 views

DS1337 with shared I2C pull-up

I have a project using an ATMEGA328P and a DS1337 RTC chip. The DS1337 is an 8 pin IC with VCC at pin 8 and GND at pin 4. According to the datasheet both pin 5 (SDA) and pin 6 (SCL) need an external ...
jhorv's user avatar
  • 43
1 vote
0 answers
44 views

Reprogram By Address: Arduino Node Array

Let me just start off by saying that this is the first time I've attempted a project at this scale. I'm not sure that I'm even taking the right approach on this. I'm attempting a project inspired by ...
Isaiah van der Elst's user avatar
2 votes
1 answer
115 views

SPI.begin doesn't work after tristate

I am working on a ultra-low power project using an ATMEGA328P, a nRF24L01 and a 0.47F super-capacitor to measure various sensors akin to Gammon's solar power project. I have been having problems with ...
jhorv's user avatar
  • 43
-1 votes
1 answer
564 views

ATmega328p bootloader issue : [avrdude: stk500_recv(): programmer is not responding]

I am using an arduino uno board and have placed the new ATmega328chip in the socket as a simple setup as mentioned in Minicore installation instructions. However, I am unable to burn the bootloader. I ...
Zaffresky's user avatar
  • 183
1 vote
0 answers
92 views

Why does this piece of code overflow at 255?

Im having a problem where i got unsinged long variable and i need to increment it in eeprom everytime setup starts and it overflows at 255 back to 0. unsigned long NumberOfBoots = 0UL; #define ...
Nicky's user avatar
  • 11
1 vote
1 answer
61 views

Custom 328P-AU board not responding via ICSP

I created a custom PCB based on a 328P. The design is mainly based on the Arduino Nano schematic (3.0). The boards have arrived some days ago, and I can't get avrdude to recognize them via USBASP (or ...
jack's user avatar
  • 123
1 vote
0 answers
53 views

Help with understanding fuses for an embedded AVR project

I am planning to build a project, but it's something quite embedded and I have no need for the extra features or bootloader of a standard Arduino. At the same time, I think I want to use the ATmega ...
user avatar
1 vote
4 answers
2k views

What does avrdude: Device signature = 0x000000 mean? Faulty wiring? Software issue? Incorrect tutorial?

I followed this tutorial a couple of times and when I clicked on bootloader I get this error: avrdude: Device signature = 0x000000 To see the configuration file click here. Why do I get this error (...
ainnnmanir's user avatar
1 vote
0 answers
34 views

Receiving code between atmega328P (C) and Feather m0 (Arduino)

I've tried to create a receiver code for receiving my data (really only want the ac/gy values and nothing else) and use the following main code for sending via C programming: https://github.com/...
Robin Svensson's user avatar
0 votes
1 answer
103 views

Atmega328p with arduino without the board

Perhaps this is a beginners question and I am not sure. I currently have a custom made circuit with an atmega328p chip connected to an mpu6050. However, when I program in Arduino I am not sure what to ...
Robin Svensson's user avatar
0 votes
1 answer
226 views

LED Blink in assembly with timer1 output compare interrupt not working

I was trying to have some fun with avr-assembly on my arduino and I tried the following codes to blink my LED first I tried the ISR approach and when It didn't work I tried the CTC mode one, both ...
Mahmoud Salah's user avatar
1 vote
1 answer
42 views

Will the noise from a voltage regulator interfere with IR LEDs and receivers on an Atmega328? (Arduino Uno sketch)

I have a project which uses an IR LED and receiver to communicate with other Arduinos. I am using the Atmega328 out of the Uno, rather than the whole Arduino board and I need it to be battery-powered, ...
Patrick's user avatar
  • 63
-1 votes
1 answer
916 views

Why ATMEGA328P U-TH doesn't answer to USBasp but work fine with Arduino as ISP?

I ordered ATMEGA328P AU from China recent but I got "ATMEGA328P U-TH". which seem super problematic. I try to use USBasp to burn bootloader but it fail and show error message as shown. ...
M lab's user avatar
  • 131
1 vote
0 answers
192 views

Error message while trying to burn bootloader onto atmega 328p

I have tried to burn bootloader onto an atmega 328p chip onto a breadboard using another arduino uno , I am not using an external clock but I am doing all the steps to make this thing which are given ...
Divyansh Veer singh's user avatar
2 votes
1 answer
2k views

How detect I2C errors with requestFrom()

I am going to use MCP23017 chips, and some of them will be cabled with a 1 meter max unshielded cable. I am expecting that certain transmissions may toss errors. So I want to tackle this problems by ...
bask185's user avatar
  • 133
0 votes
1 answer
694 views

LED does not blink - Arduino UNO+WiFi R3 ATmega328P+ESP8266 board

As I am learning the Arduino coding, I want to see if my program can turn on the LED light. I have tried all the things, but the code does not start the LED light I have installed on the board. The ...
Nevin Kristen's user avatar
3 votes
1 answer
198 views

Nrf24l01 smd pcb placement tips

I am working on pcb design with nrf24l01 smd. I have read somewhere that nrf24l01 module has problem while communication when it is placed with its antenna within the pcb. I want my module to be ...
Anmol Kumar's user avatar
1 vote
1 answer
1k views

AVRdude does not read the FUSE byte values correctly

I am exploring the ATmega328p MCU via a standard Arduino UNO, with the help of avr-gcc toolchain and AVRdude (All in the WINAVR package). I have successfully programmed the board a few times with it. ...
Kraken's user avatar
  • 113
0 votes
1 answer
737 views

Atmega 328p at 3.3v : Internal vs external oscillator

I am currently working on a pcb that uses smd atmega 328p (au). I will be powering it through a lipo battery and a ldo regulator for 3.3v input. I am using the multiwii flight controller code. I know ...
Anmol Kumar's user avatar
1 vote
0 answers
50 views

Arduino code crashing

I am writing an SIM900A + arduino(Arduino UNO with Atmega 328P) code to just send the current time stamp every 20 minutes. The code keeps crashing in the SendMessage() function as the setup prints ...
Ash96's user avatar
  • 11
1 vote
1 answer
64 views

Atmega 328P U crash on 5V/1A [closed]

Atmega 328PU crash on 5v/1A. Why? It works on 5V/400ma but when i switch it to 5V/1A power it crash. Any idea or solution for this?
krozero's user avatar
  • 113
0 votes
2 answers
102 views

Can I use the microchip of Arduino Uno as a standalone microcontroller

I want use the ATmega328P chip of the Arduino Uno board as a standalone device. Is that possible? Which pins are which on the Arduino board and the ATmega328P? Do I need any external components?
ainnnmanir's user avatar
1 vote
0 answers
155 views

Cannot program ATMEGA328PU after burning bootloader with internal clock

I have build a couple of boards that have an ATMEGA328P-AU (the 32 pin MLF, as used on the Arduino Pro Mini). If I burn a bootloader via SPI to use an external 8MHz clock, I can then use the Arduino ...
JavaLatte's user avatar
  • 111
1 vote
0 answers
53 views

SD card initialize and fails when date changed

i am making a project using Arduino Uno that display data on 7 seg display which stored in SD card as day by day. when i make power ON to device then SD card initialization done & data shows ...
Asif Ruikar's user avatar
1 vote
1 answer
426 views

Programming 328PB from Arduino IDE using Atmel-ICE to ICSP port

Updated question. The original question was based on using 'Upload' from the Arduino IDE, instead of 'Upload Using Programmer' under 'Sketch'. The problem in getting the Atmel-ICE to work with ...
ttss's user avatar
  • 11
2 votes
1 answer
53 views

Can Arduino uno adjust input square wave duty, phase and frequency with just timer-counter?

Requirement: I have input 4KHz pulse input Divide it's frequency in half Arbitrarily adjust phase Arbitrarily adjust duty Out put the modified pulse My solution (CPU): uint8_t cnt = 0; uint16_t t1 = ...
7E10FC9A's user avatar
  • 209
1 vote
2 answers
607 views

Atmega328 and ADXL335 - is the right choice for vibration analysis?

I'm planning to use the ATMEGA328 and the ADXL335 accelerometer to monitor the bearing and gears vibration of a industrial extractor that works at maximum speed of 3000rpm at 380VAC - 50Hz . The main ...
SardoMan's user avatar
  • 167
-1 votes
1 answer
131 views

Problem with sending IR with at ATMega328P-PU

I have a sketch that sends an IR code every second. It works fine (the correct code is received by my receiving Arduino next to it) on the Arduino but when I try to move the sketch to an ATMega328P-PU,...
Patrick's user avatar
0 votes
1 answer
929 views

avrdude fuse error when programming ATMEGA328 without crystal

I built several boards with an ATMEGA328 and no crystal a couple of years ago. I programmed them successfully with a bootloader using usbasp, and with a sketch using the Arduino serial interface. I ...
JavaLatte's user avatar
  • 111
1 vote
0 answers
346 views

IRremote sending only works once with Arduino Nano

I am trying to control a receiver, wich is not working. I believe i have to send the code at least three times... but after the first time the IR Led stays off. I am using the Arduino Nano with the ...
trueToastedCode's user avatar
1 vote
0 answers
243 views

Trying to use a gyro sensor and having issues

My setup is Arduino Mega. I have a gyro sensor that I'm trying to use to measure the acceleration or G force in X axis (forward movement). So far I'm trying to figure a way to use the value of Acc or ...
Andy Morgen's user avatar
0 votes
2 answers
199 views

What processor can I replace on behalf of ATMEGA328P, to get more processing power for machine learning in UNO

I wanted to do a machine learning project in Arduino UNO R3. But I came to know that the processor(ATMEGA328P) isn't capable of supporting the processing power needed for machine learning. So is there ...
Prajan 07's user avatar
1 vote
1 answer
237 views

Replacing the IC (atmega328) if lifespan has been arrive

Consider if the lifespan of atmega328 has been wear out. It said on datasheet of atmega how many times we can upload sketch about 10.000times (cmiiw), should i change the arduino or only the ...
Muhammad Ikhwan Perwira's user avatar
6 votes
5 answers
989 views

How do I convert Arduino to an ATmega328P-based project?

I have an Arduino board where I am using some of the peripherals like LCD with I2C. Now I want to convert this Arduino-based circuit to an atmega328p based circuit, i.e. atmega328p with LCD and I2C. ...
Mahadev Panchal's user avatar
1 vote
1 answer
140 views

Difference between FreeRTOS libary (AVR_ATmega328PB_Xplained_mini_GCC) Versus FreeRTOS compatible for Arduino boards from Richard barrey

I am researching about different IoT development boards and found that espressif uses IDF framework. When looked at the source code it uses FreeRTOS libraries. I have Arduino Uno and i wanted to use ...
user12652846's user avatar
2 votes
0 answers
539 views

Still getting "stk500_recv(): programmer is not responding" while uploading to bare ATmega328P

SOLVED! See bottom. I know this question has been asked a lot (believe me, I've been Googling for solutions for 3 days, and have come across many posts on SE), but none of the posts I've found have ...
Carl S's user avatar
  • 21
0 votes
3 answers
108 views

Why does my 23,032 byte Arduino sketch take 36.32 sec to upload via ISP to an Atmega328p on a breadboard w/code verification disabled?

"Sketch uses 23032 bytes (71%) of program storage space. Maximum is 32256 bytes. Global variables use 1342 bytes (65%) of dynamic memory, leaving 706 bytes for local variables. Maximum is 2048 ...
cody blanchard's user avatar
2 votes
1 answer
443 views

What are a few good ways to connect multiple I2C busses?

I have an issue with a project. I have a backplane with an Atmega328P based microcontroller controlling an I2C bus with multiple peripheral devices. One such peripheral is a removable card with ...
Delaney Fitzpatrick's user avatar
1 vote
1 answer
213 views

Standalone ATmega328P stops responding when RX is connected

I have followed this demo and have set up a standalone ATmega328P being programmed from a Raspberry Pi via the SPI lines. I have also added a 16 MHz crystal with 22 pF capacitors, as well as I have ...
php_nub_qq's user avatar
1 vote
1 answer
144 views

Standalone ATmega clock continuous lifetime

Here I have made a standalone ATmega328p clock without any RTC module using the breadboard ATmega328p , LCD I2C , and some buttons which I would like to turn on for atleast an year (supposed to be ...
Subha Jeet Sikdar's user avatar
1 vote
0 answers
262 views

device signature 0x000000 when burning bootloader

I receive this message: "device signature 0x000000" when a try to burn the bootloader on a atmega328p-au (SMD) inserted on PCB i am using arduino uno as isp i already uploaded the ArduinoISP ...
JOSEPH's user avatar
  • 21
1 vote
0 answers
55 views

Automatic water pump Trigger System - I need my code FIXED

int out = LED_BUILTIN; int strt = 3; int stp = 9; void setup() { pinMode(out,OUTPUT); pinMode(strt,INPUT); pinMode(stp,INPUT); } void loop() { while(true) { if(digitalRead(strt) == LOW) ...
Saagar G's user avatar
1 vote
0 answers
35 views

How can I use Arduino Analog Uno pins as Digital pins? [duplicate]

How can I use Arduino Uno Analog Pins as Digital pins, So that I can Attach more components like sensors to the Arduino? My 13 pins are preoccupied and I want more.
Amit Nikhade's user avatar
1 vote
2 answers
557 views

Using Arduino UNO as FTDI

so , just bought some pre-bootloaded ATmega328(p/pu) to which I need to upload sketches on a breadboard using uno TX and RX pin as FTDI Here is what I am to do. I connected Uno GND and Reset . ...
Subha Jeet Sikdar's user avatar
1 vote
1 answer
659 views

Is it possible to upload and run code from EEPROM during boot time?

I am having problems while writing custom bootloader, so that it uploads code from EEPROM (for now internal, as I have no external memory in my hands) and writes into flash. After ~2 weeks of ...
Miradil Zeynalli's user avatar

1
2
3 4 5
10