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.
509 questions
1
vote
1
answer
673
views
Interval timer on Arduino: Doubt about TimerOne library
I want to synchronize a timer interrupt from a button is pressed. I want to read a button state 3 seconds later from the first pulse moment (to identify long pressed button, 3 seconds for this example)...
1
vote
1
answer
838
views
Uploading to an external Atmega328P with a clone UNO R3 with soldered chip
As a complete newbie, after much looking for the best bargain, I ended up buying one of these UNO R3 clones, without realizing it had the chip soldered on the board. It looks like this:
It works OK ...
2
votes
1
answer
136
views
Will the pro trinket gamepad library work on an Arduino Uno?
I have an Arduino Uno and I wanted to know if the pro trinket gamepad library works on an Arduino Uno since both have same atmega328p CPU chip.
2
votes
1
answer
1k
views
Arduino not rebooting with watchdog enabled
I have a custom board that is switching an inductive load through a 10A@230V ac relay.
Due to a poor design, voltage spikes are causing the board to reboot from time to time (brown-out, watchdog and &...
0
votes
1
answer
112
views
Where does the 5v Output power on the Arduino uno come from?
I am wondering where the extra 5v output power on the Arduino uno come from. Is it directly from the atmega328 microcontroller or from the external power source (usb or 9v battery). Thanks.
2
votes
1
answer
386
views
Arduino data-types
(Im new to the arduino side of stackexchange). Im working on a worksheet for to begin with arduino. I have prior experiences working with arduinos, but problem is new for my field of expertise. Any ...
0
votes
1
answer
610
views
Adding L293D motor shield to Breadboard
Anyone knows how to attach the l293D motor driver shield on a breadboard?
I need to put the shield on top of a breadboard and then use an Atmega328P as the main way of controlling it.
Than you :)
2
votes
0
answers
413
views
Stand alone Atmega328p-au
I'm trying to make a standalone arduino board with an OLED display using an Atmega328p. I never tried to make such a board using SMD components. I've soldered everything together except the OLED ...
2
votes
1
answer
96
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>...
2
votes
2
answers
1k
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 ...
0
votes
1
answer
141
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 ...
2
votes
1
answer
255
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 ...
1
vote
0
answers
118
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 ...
1
vote
0
answers
75
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 ...
1
vote
0
answers
46
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/...
0
votes
1
answer
331
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 ...
-1
votes
1
answer
1k
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.
...
3
votes
1
answer
4k
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 ...
3
votes
1
answer
375
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 ...
0
votes
1
answer
1k
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 ...
1
vote
1
answer
99
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?
1
vote
0
answers
216
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 ...
1
vote
1
answer
633
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 ...
1
vote
2
answers
982
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 ...
0
votes
1
answer
1k
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 ...