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.
504
questions
0
votes
1
answer
43
views
ATmega328 PCB schematic [closed]
Can anyone give me a PCB schematic of a microcontroller. Instead of soldering or connecting a microcontroller, to my PCB, I would like to integrate one into my PCB. So what I need is a schematic of ...
7
votes
2
answers
3k
views
Finite loop runs infinitely
To gain better understanding of both Rust and Arduino (Uno), I'm trying to write direct hardware code for Arduino in Rust. Here's a very simple LED blink example, that I've tried to write.
I've made ...
1
vote
1
answer
131
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 ...
0
votes
0
answers
21
views
Blink works fine(as test for board) Otto_allmoves doesnt, I get following error: [duplicate]
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"
Sketch uses 18330 bytes (59%) of program storage space. Maximum is 30720 bytes.
...
4
votes
1
answer
66
views
ATmega328PB Sleep Mode Current Consumption
I am using an ATmega328PB to run an RF module. When testing sleep mode current consumption, I noticed it was much higher than I expected. I took off all unnecessary components. The only things in the ...
0
votes
0
answers
65
views
atmega328 custom board unable to upload code after bootloader is installed [duplicate]
I have a custom Arduino board with the atmega328 chip onboard. I am able to install the bootloader perfectly fine by connecting the mosi, miso, sck and reset pins onto an arduino uno, and then running ...
2
votes
1
answer
180
views
Hardware serial baudrate inconsistent between Arduino nano and standalone 328P
I have a 328P (328P-AUR to be specific, [link]), and in the schematic below is how I've implemented it to a PCB:
Uploading a program works fine, but I hink there is an issue with the clock source, ...
1
vote
1
answer
167
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 ...
4
votes
1
answer
256
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 ...
0
votes
3
answers
4k
views
Bluetooth module(HC05) works with Arduino Uno but not with breadboard (ATmega328)
I am currently working on a project that requires communication between an android phone(galaxy s4) and an ATmega328 microprocessor. To connect these devices wirelessly I'm using an HC05 bluetooth ...
1
vote
1
answer
50
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 ...
0
votes
1
answer
580
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 ...
1
vote
1
answer
158
views
Emulating Arduino Uno with QEMU: interrupts do not work
So I wrote this code for Arduino Uno:
// file qemu.ino
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(millis());
}
And then compiled and uploaded it to the real ...
3
votes
1
answer
121
views
I can't upload my sketch to Arduino Uno using avrdude
I have already spent a couple of days by trying to upload a sketch onto my Arduino Uno R3 board and now it's time to give up, so I'm trying to ask some more experienced developers.
My hardware and ...
0
votes
2
answers
318
views
USART, SPI or Bit-Bang for the continuous transfer of bytes without inserted extra bits
I have heard that
The SPI hardware introduces a 9th, HIGH bit between bytes
USART still uses start and stop bits when in synchronous mode
Are both these statements true? Can I modify the built-in ...
3
votes
1
answer
3k
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 ...
2
votes
1
answer
149
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 ...
-2
votes
2
answers
53
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 ...
4
votes
1
answer
90
views
Low-byte fuse programming of ATmega328 on Arduino Uno
I want to use the ATmega328 on my Arduino Uno board to clock a TDC1000 using the clkout bit of the ATmega328, but this requires fuse programming of the low byte. Can anyone tell me how to do this?
1
vote
4
answers
4k
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 (...
0
votes
1
answer
150
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 ...
1
vote
2
answers
4k
views
Serial printing from flash memory (F() macro, PROGMEM, sprintf_P, SPTR)
I have been testing various techniques on an Arduino Uno for serial printing from flash memory instead of RAM. At the same time, I have been using the freeMemory() function from Adafruit.
I created a ...
1
vote
1
answer
111
views
Atmega Millis with Quartz crystal
I followed https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard this tutorial to program my Atmega 328p to run on a breadboard with a 16 MHZ Quarz crystal and two 22pF capacitor.
I want to program a ...
5
votes
3
answers
20k
views
ATMEGA328P-U vs ATMEGA328-PU
On my Arduino UNO the chip part number is ATMEGA328P-U, i recently bought a ATMEGA328-PU to make a standalone Arduino. realized the part number differences after receiving the package...
I noticed ...
3
votes
1
answer
282
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 ...
0
votes
4
answers
224
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 ...
2
votes
2
answers
319
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 ...
1
vote
2
answers
236
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 ...
1
vote
0
answers
31
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 ...
0
votes
2
answers
307
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 ...
-1
votes
2
answers
103
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 ...
1
vote
1
answer
794
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 ...
1
vote
0
answers
36
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 ...
0
votes
1
answer
82
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 ...
1
vote
2
answers
456
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 ...
7
votes
3
answers
11k
views
How to deep sleep ATtiny/ATmega (to run for years with batteries) but still detect a button press?
Question (TL;DR): what is the optimal method to deep sleep (to run an ATtiny45 or ATmega on batteries for 1+ year) but still be able to detect a button press? Is it possible to deep sleep until a ...
13
votes
3
answers
7k
views
I got a missignatured ATmega328-PU. How can I fix that?
Sometime in the past, I was burning bootloaders on a fresh batch of four ATmega328-PU using the Arduino IDE (notice there's no P after 328 - it's the slightly cheaper non-picopower version of the MCU, ...
4
votes
3
answers
5k
views
Is the LGT8F328P legal?
Since some months, everyone can buy a board with this IC.
It is compatible with the ATMega328 and has some features like 12bit ADC (instead of 10 bit), DAC, unique ID and also 32MHz.
But I can't ...
0
votes
1
answer
722
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 ...
1
vote
1
answer
79
views
How to load scal factor external to the code?
We know that, we need calibration factors (scale factors) to read current sensor data (ACS758) to arduino. I am also using voltage reader using voltage divider circuit for my project. I need to build ...
0
votes
2
answers
1k
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 ...
0
votes
2
answers
448
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 ...
-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 ?
0
votes
2
answers
887
views
Replacing large lookup table with switch statement
My arduino needs to take a 14-bit number and convert it to a 10-bit number. Can't use a formula for it since the data is quite random. So I created a lookup table with 2^14 elements, each containing a ...
8
votes
3
answers
7k
views
What is the rise time of an output pin of atmega328 changing its state?
I've already searched a lot and didn't found the answer. Also, I don't have an o'scope. Anyone can help me?
7
votes
7
answers
15k
views
Arduino 16 MHz with only 3.3V?
Now I have these Arduino Pro Mini from Sparkfun. They are the latest version that I know (yeah, it's the one that have those horrible misaligned pins). Now they are designed around the ATmega328P and ...
1
vote
1
answer
152
views
Keep 5V on while sleep with LowPower library [closed]
Is it possible to keep the 5V on, while putting the Arduino (ATMEGA328P) in sleep more, using LowPower library?
I'm trying to use this HAT:
https://spellfoundry.com/product/sleepy-pi-2-usb-c/
to ...
0
votes
1
answer
459
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 :)
0
votes
0
answers
41
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 ...
0
votes
1
answer
97
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 ...