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
-2 votes
2 answers
40 views

Physically passing through a pin to access another [closed]

I would like to know about physically passing through a pin in order to get to another. For instance, if I have a sensor on one side of an ATMEGA328P or ESP8266 (Wemos D1 Mini) yet need to connect to ...
jhorv's user avatar
  • 41
1 vote
1 answer
80 views

Is it safe to leave an ATmega328PB's RX and TX pins unconnected?

I am using an ATmega328PB and was looking at Arduino's and others' schematics that use it. All schematics I've found use a serial chip to communicate between USB and TX & RX. However, I do not ...
Acmek's user avatar
  • 13
0 votes
0 answers
46 views

AVRDUDE issue with port on Linux [duplicate]

I've seen similar posts like this but I haven't been able to figure out the issue. I am trying to program my Arduino Uno R3 which uses an ATmega328p on Debian linux with AVRDUDE. I am following this ...
tekteky53's user avatar
0 votes
1 answer
60 views

ATmega328 drop-in replacement with more flash memory

Is there a ATmega328 drop-in replacement with more flash memory? Needs to be 28 pin DIL to fit the socket. Alternatively, is there a board that has the exact dimensions and pins as an Arduino UNO, but ...
Björn Morén's user avatar
0 votes
4 answers
142 views

Can arduino be used in industrial projects?

I'm developing an industrial project and my programming knowledge is limited to arduino. I'm planning to use either Atmega328 or STM32F103C8T6 chip in my pcb and to program it using arduino IDE. My ...
vignesh vignesh's user avatar
4 votes
1 answer
187 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
2 votes
2 answers
203 views

Barebones AVR - Connecting RESET pin to Vcc

I want to build my first barebones AVR circuit. I plan on NOT having a RESET button. For this reason, is it valid if I connect the ATMEGA's RESET pin to Vcc directly? What I mean by this, is that in ...
user1584421's user avatar
  • 1,395
1 vote
0 answers
28 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
2 answers
156 views

interface pcf7991at to arduino

I wanted to try to interface the pcf7991at with arduino, I assembled the pcb containing the pcf7991at following the diagram shown in the datasheet. I saw that a frequency of 125khz must go on the CLK ...
Gastone Krankenwagen's user avatar
-1 votes
2 answers
87 views

Atmega 328pu on breadboard. What to choose in order to upload code with ftdi converter

When I program atmega328 PU on breadboard,vwhat programmer do I have to use and what arduino board type I have to choose? I am trying this with ftdi converter I have already done the connections and ...
Alexis Tsetsonis's user avatar
1 vote
1 answer
522 views

Problem with using PubSubClient, the "callback" function doesn't seem to work correctly

I have a program that communicate between a esp8266 and a atmega328 using Serial, the esp8266 will connect to a MQTT server running on local network, and publish/subscribe to some topics. In the ...
J. C. Stark's user avatar
0 votes
1 answer
386 views

IDE will not upload to ATTiny88

I was successfully compiling sketches and uploading to various MCUs, including the ATTiny88. Suddenly the IDE quit compiling and complained of various missing compilers. I found and corrected an ...
Leslie Rhorer's user avatar
3 votes
1 answer
203 views

The gateway is not working in Arduino EthernetENC

I am using ENC28J60 and EthernetENC library to connect an Arduino UNO with ATmega328 to the network. Everything works fine within the local network, but outside of it, I cannot ping the device. What ...
ArgusLibovski'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
0 votes
1 answer
68 views

ATTiny88 missing pulses - maybe

I have been given to understand the ATTiny88 is very similar to the Arduino Uno / ATMega328 MCU. There does not seem to be a tag for the ATTiny88, so that is why I chose the tags I did. I do not ...
Leslie Rhorer's user avatar
1 vote
2 answers
318 views

Timer 1 "Set on Compare Match" in Normal Mode - Not working

I'm using the hardware timers on the 328 for phase angle control of a triac with zero-crossing detection. I am encountering some strange behavior with the "Set on Compare Match" feature not ...
saustinp's user avatar
0 votes
1 answer
459 views

Arduino nano timing precision

How precisely can an Arduino nano be timed? The project I am working on needs two Arduino nano to work synchronously. Arduino one have to activate a relay after 2700 sec and Arduino two have to ...
Lawliet's user avatar
  • 183
0 votes
2 answers
686 views

SoftwareSerial will not read all of the printed string when calling readString()

I have an Arduino UNO and an ESP32 that need to communicate to each other using SoftwareSerial. The problem I am coming across is that when I call readString and print it out using Serial, it will not ...
Primitive's user avatar
0 votes
2 answers
288 views

Is it possible to program an AVR chip (atmega328p) via i2c?

Currently I am using avrdude and I'm programming my atmega328p chip via the spi pins by pulling the RESET pin low (spidev programmer). In my project I'm using predominantly i2c and this the only place ...
php_nub_qq's user avatar
2 votes
1 answer
122 views

Curious Collision between OneWire and RadioHead

The code below runs on an Arduino Pro Mini (8MHz 328p) sending temperature readings using an inexpensive ASK transmitter. I use OneWire to read the DS18B20s, and RadioHead to manage the radio. The ...
Eric Nelson's user avatar
-2 votes
2 answers
2k views

Sketch uses 33218 bytes (102%) of program storage space. Maximum is 32256 bytes?

I need to upload code on atmega328 wihout bootloader https://github.com/EasyOne2030/test but see Sketch uses 33218 bytes (102%) of program storage space. Maximum is 32256 bytes ?
one next's user avatar
0 votes
0 answers
39 views

Writing to ADMUX on 3.7V from battery restarting chip

Given: arduino nano (atmega328P) with nrf24l01. What am I trying to do: Measure battery drain. What am I doing for that. So I made a small research of how could I measure the battery voltage without ...
user10160994's user avatar
0 votes
1 answer
88 views

Problem with character concatenation algorithm in matrix led

good afternoon, I am making a 7x10 led matrix in which I use a CD4017 to handle the 7 rows and 2 cascaded shift registers to handle the 10 columns. I first tried a programming to turn on my entire led ...
Lucio Mazzini's user avatar
1 vote
2 answers
1k views

Call functions of one class from another class - Callback

I am new to C++ & I need to call functions of one class from another class. And so that the classes do not know anything about each other. How to do it in Arduino environment? class Encoder { ...
Andre's user avatar
  • 27
-2 votes
1 answer
242 views

1Hz & 32Hz from 32.768 kHz on ATmega328P at 8MHz & DS3231 32K

I have a 32.768 kHz signal at the ATmega328P input. I need to get 2 signals from this signal: 1Hz and 32Hz. How well will it work? How to do this with a ATmega328P Timer/Counter? What gain will the ...
Andre's user avatar
  • 27
0 votes
0 answers
43 views

How does C2 work on the ATMega328P?

What is the purpose of C2 on this schematic below? How does it work when the microcontroller is being programmed?
RGB Engineer's user avatar
1 vote
0 answers
205 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
0 votes
2 answers
756 views

Standalone ATMega328 - do I need to burn the bootloader?

I want to get an ATMega328 off of the Digi-Key, and use it like an Arduino (without requiring the whole Arduino board). When it comes to programming, do I need to do anything special like burn the ...
RGB Engineer's user avatar
0 votes
0 answers
101 views

Cannot upload sketch to DFRduino nano

I previously succeed in uploading the code to DFRDuino Nano (Arduino Nano Compatible) (with wrong digital pins) but after changing pin I cannot upload it again. From the document, I changed back the ...
CoffeePlease's user avatar
3 votes
1 answer
140 views

Why am I reading only zeroes from PORTB?

I am using a custom Arduino Nano compatible board with an Atmel 328P. I am externally changing the values applied to several pins on PORTB. I expect to be able to read the values of these pins (low ...
Joe's user avatar
  • 33
0 votes
2 answers
1k views

How does erasing the EEPROM work?

The datasheet for the ATmega328P contains this table, which describes bits 4 and 5 of EECR: EEPM1 EEPM0 Programming Time Operation 0 0 3.4ms Erase and write in one operation (atomic operation) 0 1 ...
glibg10b's user avatar
  • 307
1 vote
2 answers
57 views

Can we use more than one timer when programming an Atmega32/16?

I tried to do a simple program using the ATmega16 microcontroller, the program is to toggle two LEDs the first one by using timer0 interrupt and the other using timer2 interrupt.
Ebraheem Ali Abd Al-Maksod's user avatar
0 votes
0 answers
64 views

Can't pair two HC-05 (Master - Slave)

I want to connect two HC-05 modules, one master and one slave. So to that I need to access 'AT Commands'. Theoretically, I just needed to upload an empty code, and then connect the module to the ...
Bikke21's user avatar
1 vote
1 answer
118 views

Help with Arduino sleep and watchdog timer interrupt

I want to use Arduino's sleep and wakeup functionality but have hit a roadblock and can't seem to get past it. As I am just prototyping for a final system, I cannot use the LowPower library to ...
phizaics's user avatar
1 vote
0 answers
103 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
2 votes
1 answer
408 views

Arduino Nano Atmega328P not sleeping with either <LowPower> or <avt/sleep.h>

I'm working on a battery powered Arduino Nano project. I really need it to save power for hours on end, so I turned to Arduino LowPower Library and avr/sleep.h to do the job. However, whatever I do, ...
Santanor's user avatar
  • 123
0 votes
1 answer
107 views

Safely extend TCNT1 / ICR1 to 24 bits using TOV1

I'm hoping to time external events on a '328p Arduino that will occur slowly enough that they'll overflow the 16-bit counter TCNT1. In a different scenario I'd prescale the counter, but I need the ...
Jim Mack's user avatar
  • 235
1 vote
1 answer
524 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)...
Juanma's user avatar
  • 113
2 votes
0 answers
410 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
1 vote
1 answer
518 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 ...
Pere's user avatar
  • 121
2 votes
2 answers
148 views

Trying to understand the bottleneck of sensor sampling rate

Lets say I have a sensor connected to Arduino Uno Rev3's I2C Bus. I am reading the sensor output and using Serial.print() to send the sensor reading back to a my laptop. I am trying to understand the ...
Quazi Irfan's user avatar
2 votes
1 answer
107 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.
Kushagra Kumar Singh's user avatar
2 votes
1 answer
86 views

SparkFun RedBoard PTH Kit wrongly configured hardware

I have a SparkFun RedBoard PTH Kit. It's not made by SparkFun, but by https://inmotion.pt (that doesn't exist anymore). I soldered it, and bought a FTDI adapter, but when I try to upload the blink ...
Ayo Reis's user avatar
  • 121
2 votes
1 answer
626 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 &...
Jvila's user avatar
  • 21
1 vote
3 answers
881 views

Power saving configuration of unconnected pins

By default, all Arduino (ATmega328P) pins are configured for input without the internal pull-up enabled. This default seems to come from the AVR microcontroller itself. When it comes to saving power - ...
maxschlepzig's user avatar
0 votes
1 answer
77 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.
Glenn Krause's user avatar
0 votes
1 answer
58 views

Bootload from a Nano to an ATMega328 without a crystal

I have a program to load from a Aduino Nano as ISP to a ATMega328p chip that will have an internal clock at 16M, but I don't have a crystal handy. Is there a way I can not have to buy a crystal? What ...
B7th's user avatar
  • 167
2 votes
1 answer
278 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 ...
UnfreeHeX's user avatar
0 votes
1 answer
177 views

Procedure for changing frequency of Nano or similar

I need to get interrupts at one of three specific rates: 1920, 2000, and 2400 per sec, at a fairly high precision (~10 ppm). I've asked about this on Electronics but I think here might be more ...
Jim Mack's user avatar
  • 235
0 votes
1 answer
386 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 :)
August Exner's user avatar

1
2 3 4 5
10