Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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.

77 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
219 views

Connecting nRF24L01 to ATmega328PU with external 8 MHz crystal problem

I am trying to fix the problem of communicating between two nRF24L01+ together, one connected to an Arduino Uno and another connected to an ATmega328PU with an 8 MHz external crystal. The bootloader ...
Jon depoy's user avatar
3 votes
0 answers
703 views

Is it possible to put ATtiny85 to sleep while using TinywireS?

I have an arduino uno as the master I2C device talking to an ATtiny85 as the slave. What I want to do is have the Attiny85 receive a message from the UNO to tell it to power off which will then ...
SpeedOfSpin's user avatar
3 votes
1 answer
3k views

Atmega328P-PU: Programmer is not responding

Few days ago, I built my own custom Arduino on the breadboard. It is built according to tutorial on http://www.crash-bang.com/resource/breadboard-arduino/. The Atmega328P-PU is already burned with the ...
Lorin's user avatar
  • 131
2 votes
0 answers
457 views

Why can't an Arduino/ATmega328 act as an SPI slave at anywhere approaching the maximum speed claimed in the datasheet?

The ATmega328 datasheet claims a maximum SPI slave speed of Fosc/4. For a chip clocked at 20MHz, that would be 5Mbps. However, my tests show that even with no processing whatsoever in the interrupt (...
Infinity Computers's user avatar
2 votes
0 answers
255 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 ...
Aerandir's user avatar
2 votes
0 answers
607 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
2 votes
0 answers
177 views

Start VL53l0X measurement failed

The initialization of the ToF fails with this code. I'm trying to frankenstein it with Radiohead RFM69, so far no luck. // rf69_reliable_datagram_client.pde // -*- mode: C++ -*- // Example sketch ...
Mr Joseph's user avatar
2 votes
0 answers
583 views

Clear Timer on Compare or CTC in ATmega328P, Toggle OC0A on Compare Match

I want to use the CTC on the ATmega328P to play same notes with a speaker, a project that I find in this book. In the data sheet I read: For generating a waveform output in CTC mode, the OC0A ...
Ugo Mela's user avatar
2 votes
0 answers
983 views

Cannot upload to otherwise working bootloaded ATmega328P via RS232: "programmer is not responding"

I have an ATmega328P on a breadboard with the following circuitry around it: The ISP is a Tiny AVR Programmer. The RS232 to USB converter is this thing. Following is the test program I use: void ...
Niko O's user avatar
  • 151
2 votes
0 answers
1k views

PWM output maximum current

i made a project with arduino in wich I used arduino to activate 18 n-ch mosfet with PWM. I used the softPWM library to use PWM in 18 output pins, I used a nano v3. The question is about the maximum ...
brazoayeye's user avatar
2 votes
0 answers
287 views

Garbage when listening to serial

This is the atmega328p code that is supposed to send a predefined message repeatedly. #include <avr/io.h> #include <util/delay.h> #define BAUD 9600 #define BAUD_PRESCALLER (((F_CPU / (...
vasily's user avatar
  • 133
2 votes
0 answers
78 views

Standalone atmega328

I have a transistor tester with 16x2 LCD running a plug-in at328 with an 8Mhz xtal. I would like to use this hardware for another purpose. My first idea was to replace the crystal with a 16Mhz one, ...
H.Davies's user avatar
2 votes
0 answers
211 views

ATMega328 not able to fully switch coreless motor on

I'm having trouble regarding motor control in a project I'm working on. It uses an ATMega328 DIP package on a PCB. The motors I'm using are small coreless motors and I'm trying to control them using ...
SidharthM's user avatar
2 votes
0 answers
480 views

How to use the timer to generate a pulse wave of the specified frequency and duty cycle

So we have the tone library, which produces a 50% duty cycle square wave of varying frequency, and analogWrite() which produces a fixed frequency wave of varying duty cycle. Is there any way to ...
3871968's user avatar
  • 308
2 votes
0 answers
35 views

Atmega328 xbee and softaware serial libraries

I use an atmega328 with fdti cable wired at rx/tx and i want to connect a zigbee s2 at diferrent pins. I have tried to use SoftwareSerial library but i would like to use the xbee library too. Is ...
G-V's user avatar
  • 21
2 votes
0 answers
37 views

Lightblue Bean BTLE tinkering

How does one modify the Bluetooth settings, like services or pincode, on a light blue bean? Ps I'm on Android http://legacy.punchthrough.com/bean/ if you don't know what I'm talking about
Alexander M's user avatar
2 votes
0 answers
339 views

Can't program bareduino. "avrdude: stk500_recv(): programmer is not responding"

I've built a bareduino. The blink sketch that it came preprogrammed with worked. I was also able to program the ATmega328 by putting it into a arduino uno. What I can't do is upload a sketch directly....
futurebird's user avatar
2 votes
0 answers
541 views

SIM 900 stop after 1'5 hours; what's wrong?

I have a Gboard module (from Itead) configured to recieve data from Xbee sensors, and log data to a server DB on inet (via GPRS). This module is programmed with Arduino IDE. I turn on the module (...
Xavi Gómez Canals's user avatar
2 votes
0 answers
1k views

Unexpected Timer Conflicts (Uno)

I've been working on a project (Arduino Uno: Atmega328) that implements a gyroscope (which is used with the LSM9DS0 spark-fun library) that is communicated with through I2C and uses a Servo library. ...
Sock314's user avatar
  • 153
2 votes
0 answers
1k views

Several XBee End devices sending simultaneously; Only one packet recieved on coordinator

I'm trying to configure a Zigbee sensor network. My "gateway (coordinator)" and "End devices" are made with XBeePro S2B model and configured in API mode "2". The "gateway (coordinator)" also has a ...
Xavi Gómez Canals's user avatar
2 votes
0 answers
2k views

Serial.prints ignored

I've been working on a project where I want to transmit data from one arduino to another using an Xbee network and then parse it to update some PWM outputs accordingly (Building a system which ...
openTankist's user avatar
1 vote
1 answer
37 views

Is it possible to use an already working Barebones (328P) via FTDI to load a bootloader onto another 328P?

When testing / developing a proto type using a barebones board with 328P, I usually add a Serial to TTL adapter, which then allows me to modify and upload code as well as being able to the use Serial ...
Manie Serrao's user avatar
1 vote
0 answers
29 views

Mirroring PWM input on a pin + Motor Encoder

I am interested in hooking up a nano to an RC receiver. I want the nano to mirror the PWM input and output on another pin when a specific command is given via serial. I also want to send the received ...
FourierFlux's user avatar
1 vote
0 answers
35 views

Atmega328P constantly restarting when defining a function

I wanted to make a simple led on/off program using USART interface. When the code doesn't have any functions other than main it runs fine, however Arduino keeps resetting when one is included. At this ...
L1RG0's user avatar
  • 19
1 vote
0 answers
227 views

Is it possible to use Nano with mblock and oldbootler?

I've old Nanos that to program (upload) with Arduino IDE I have to select "ATMEGA328P Old Bootloader". The programming is via the standard Nano USB cable, and I need the CH340 driver under ...
pathfinder's user avatar
1 vote
0 answers
114 views

ATmega 328 Bootloaded, but Cannot Upload

I have been working on a project that I program using the ATMEGA 328p inserted into an Arduino Uno, and then remove it to put it on my breadboard. I now have realized how inadvisable this is, since I ...
Jenna Hebert's user avatar
1 vote
0 answers
159 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
1 vote
0 answers
45 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
1 vote
0 answers
99 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
0 answers
58 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
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
1 vote
0 answers
216 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
1 vote
0 answers
52 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
0 answers
177 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
  • 121
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
0 answers
357 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
255 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
1 vote
1 answer
161 views

FreeRTOS library (AVR_ATmega328PB_Xplained_mini_GCC) versus FreeRTOS for Arduino boards

I am researching different IoT development boards and found that Espressif uses the IDF framework. When I looked at the source code it uses FreeRTOS libraries. I have an Arduino Uno and I want to use ...
user12652846's user avatar
1 vote
0 answers
298 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
60 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
157 views

How can I program my self made Arduino board using USB to TTL converter?

Recently I got a coupon for JLCPCB which was 100% discount so, I designed my 10 Arduino board specially for my needs and ordered it from JLC PCB. The schematic of the board is given. At the time ...
Niyoj oli's user avatar
  • 111
1 vote
0 answers
421 views

Arduino Wont Run Program at 4 Mhz

I want my Arduino Nano to consume as little power as possible, so I have been lowering the clock frequency with CLKPR from the default 16 MhZ speed. I successfully ran the program at 8 Mhz by setting ...
I Like's user avatar
  • 205
1 vote
0 answers
131 views

Warm Atmega328p and weird power behaviour

I recently built a circuit with an atmega328p (which I have never used before standalone) and attached all the neccessary components (crystal, capacitors etc). However, when I powered it up with a ...
JediTom99's user avatar
1 vote
0 answers
48 views

Why am I only seeing 1.3V on an analog pin that has been set to high using digitalWrite?

I have run into a bit of trouble with a sewable electronics project. I am trying to power a SparkFun 7-Segment Serial Display from one of the analog ports of a ATmega328 board. I realize this is ...
whatwouldkantdo's user avatar
1 vote
0 answers
39 views

generating signal of 3 phase UPS PWM by SVM

Is there a realization code for 3-phase UPS inverter by Arduino? I need implementation for SVM by voltage and current feedback.
Sergei Yanek's user avatar
1 vote
0 answers
439 views

Analog Comparator works on Nano, but not working on Pro Mini 3.3v

I've coded an analog comparator to work on Nano, but the same code does not work on a brand new Pro Mini 3.3v 8MHz. The serial monitor just outputs the triggered interrupt continuously. Lines orange ...
Rick's user avatar
  • 61
1 vote
0 answers
154 views

Problem with counting inside INT0 ISR while in PowerDown

The issue that I have is in INT0 service in which it doesn't perform properly when MCU is set in PowerDown mode. I declared a global variable as "counter" and put it inside INT0 ISR but its value ...
Nima Sajedi's user avatar
1 vote
0 answers
652 views

NRF24L01 based project freezes for no good reason

I have built and coded a low power NRF24L01 transmitter and receiver, for purposes of transmitting the temperature of the transmitter's environment. I have used an Atmega328P chip for the project. The ...
bassumex's user avatar
1 vote
0 answers
192 views

How to burn a bootloader to non-bootloaded(clean crystal) ATMEGA328P-PU with USBASP programmer via Avrdudess?

I'm trying to burn bootloader to my clean crystals, atmega328p-pu.For this I use the 16MHZ crystal with two ceramic capacitors and USBASP programmer, on Windows 10 Pro. As program for burning I tried: ...
E.M.'s user avatar
  • 11
1 vote
0 answers
1k views

Arduino nano with 128x64px OLED freezing

I have an arduino nano, MCP3424 i2C ADC and a 128x64px i2C OLED display. The function is quite basic; the arduino receives information from the ADC and prints it to the screen as described in the code ...
Asyu7's user avatar
  • 33