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
1 vote
2 answers
561 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
662 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
2 votes
2 answers
397 views

Can the atmega328 return remainder during integer division?

When I write code like this: int a = 7 int b = 2 int c = a/b int r = a%b Does the chip use the remainder while calculating c or does it redo the entire calculation?
Beacon of Wierd's user avatar
7 votes
3 answers
419 views

Measuring li-ion that arduino is running from

I am using a 5v Arduino pro mini (with regulator and power led removed). I have been reading how to accurately measure Li-ion batteries when powering from the same battery you are trying to measure ...
Lindsay Cox's user avatar
1 vote
1 answer
158 views

DIY Arduino with USB port

I am planing on making Arduino from scratch. I found many examples on internet, but they all need another Arduino for programming. How can I make Arduino with USB interface for programming and serial ...
Name's user avatar
  • 135
1 vote
0 answers
140 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
4 votes
1 answer
1k views

How to burn the bootloader and upload sketches on ATmega328P U (specifically this model)?

Recently I started to learn embedded electronics and C/C++ and for a couple of days I tried and I am still trying to burn a new ATMega328P U bought from Aliexpress. From what I know new ATMega328P's ...
Vlad George's user avatar
0 votes
3 answers
177 views

ATMega328 functions, but will not output to any pins

Problem: ATMega328 Refuses to digitalWrite() to any pins, I can upload and run sketches using the board UNO from the ide on the 328 and can confirm it is working using the serial monitor (see code). I ...
Christopher Allen's user avatar
1 vote
1 answer
1k views

How to upload a sketch to an atmega328 via FTDI FT232RL UART and Arduino IDE?

I have a sparkfun AVR Pocket Programmer and have burned the bootloader and uploaded programs using "upload using programmer" via USBtinyISP. It works fantastic. I have a sparkfun FTDI Basic (...
user14446's user avatar
  • 121
1 vote
0 answers
366 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
3 votes
1 answer
360 views

Atmega328 and 4Digit 7 Segment ghost blinking!

I hooked up 4 7Seg leds (CC) with NPN transistors on the cathode of each digit. I am using 74HC595 shift register connected in the circuit in a pretty common fashion. The code I am running is the ...
spdif's user avatar
  • 53
2 votes
1 answer
191 views

Is it possible to detach an interrupt for a certain ammount of time

Hardware: Arduino Uno Software Version: 1.8.13 My sketch has an interrupt service routine that triggers with the rising edge of digital pin 2. What I want to do now is detaching the interrupt as soon ...
L1nuS01's user avatar
  • 23
1 vote
1 answer
479 views

How to convert my Arduino setup to a PIC setup?

I have an arduino setup with LCD, RTC, EEPROM, Reed Switch, AC/DC Buck Converter, 4X4 Keypad. What PIC IC will let me connect with all these(40 Pins), and yet accept Arduino Code. I don't want to ...
hindisong.cc's user avatar
0 votes
2 answers
238 views

Using different processors when it comes to arduino

I decided to learn Arduino in this quarantine so I am still a newbie when it comes to micro controllers. Basically I been doing all my projects based on the ATMEGA328P-PU: I even converted my ...
Tono Nam's user avatar
  • 938
0 votes
1 answer
48 views

Weird effect of AVR C on USB-serial communication

I recently decided to learn direct port manipulation instead of builtin arduino routines. First I tried this piece of code void setup() { pinMode(13, OUTPUT); Serial.begin(9600); } void loop() { ...
User's user avatar
  • 139
0 votes
1 answer
1k views

Ardutester Millenium I2c Lcd Not Showing Anything!

Hiii Friends...., I am Trying to Build Components tester Using Arduino Specifically Atmega328p Chip . I Downloaded The Ardutester Millenium Code From Here .. https://create.arduino.cc/projecthub/...
VOID seekers's user avatar
5 votes
2 answers
2k views

Jumping to bootloader from application code in atmega328p

I'm trying to program an Arduino Uno (atmega328p) using only the serial Tx/Rx lines (no DTR, so no automatic reset). This is so I can upload code via WiFi/TCP using an ESP-01. To achieve this, I need ...
Nuno's user avatar
  • 63
1 vote
1 answer
1k views

WS2812B are only white on custom board

I recently designed a board for an LED project. I am using WS2812B as the LED, and an ATMEGA328P-AU as the microcontroller. I also am using an arduino nano as my ISP and using "flash with ...
Aubrey Champagne's user avatar
0 votes
1 answer
702 views

How can I burn the bootloader onto atmega328 (not atmega328p)?

Hi I bought some atmega328 chips (not to be confused with atmega328p). They are very similar but the atmega328p chips are just more power efficient, so I've read. Anyways, my goal is to burn the ...
user3308807's user avatar
1 vote
2 answers
255 views

How to use Atmega328p-PU from an Uno, on a breadboard without a crystal

How do you use Atmega328p-PU from an Uno, on a breadboard without a crystal?
Owen's user avatar
  • 43
1 vote
1 answer
228 views

Junk values in EEPROM. while writing large values

Facing an issue while writing a large value (like 2000-5000) to EEPROM using EEPROM.put(). For example, While writing 2000 values to address 5 of EEPROM. Some junk values are written automatically to ...
Mayoogh Girish's user avatar
0 votes
1 answer
281 views

Error while inputting EEPROM.read() and EEPROM.write()

I am trying to store data in ATmega328 (Arduino Uno) using the following code using tinkercad: #include <EEPROM.h> void setup() { int addr, data=1; Serial.begin(9600); for (addr=0; addr&...
Manu's user avatar
  • 113
1 vote
0 answers
121 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
44 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 votes
1 answer
110 views

Atmega 328pu as stand alone

I am used atmega 328pu as stand alone.i used 7805 as regulator. I regulated from 12 VOLT 2 amp smps. When I connect my dc 12 VOLT pump in between 12 VOLT and ground dc motor working fine but Atmega ...
Arundev M R's user avatar
3 votes
1 answer
582 views

Arduino UARTS Auto addressing slaves

i'm using this serial topology to connect my Act ATmega328p (Arduino) slaves together to a master ESP32. They are in total 10 ATmega328p slaves and one master: With this type of wiring i'm sure that ...
SardoMan's user avatar
  • 167
0 votes
1 answer
1k views

How to run atmega328p at 8, 4 and 1 mhz?

Instead of using the regular Arduino board I have purchased the atmega328p-pu along with this components: 22pf ceramic capacitor 10K resistor 16mhz crystal 47uF capacitor 3.3 Volts Power supply The ...
Tono Nam's user avatar
  • 938
0 votes
1 answer
300 views

How do I use a SMD crystal with 4 pins?

I am running my arduino project with the atmega328 chip like this: I have purchased by mistake this crystal: The reason why I purchased by mistake that crystal was because it has this description: ...
Tono Nam's user avatar
  • 938
0 votes
1 answer
2k views

Placing decoupling capacitors when building an Arduino PCB with Atmega328-PU

I have previously asked this question: Custom build of arduino on a pcb And thanks to the answer by Majenco I have learned that my circuit works a lot better when adding a capacitor. For example I ...
Tono Nam's user avatar
  • 938
1 vote
2 answers
3k 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 ...
NickG's user avatar
  • 163
1 vote
1 answer
93 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 ...
Sprinklerkopf's user avatar
1 vote
0 answers
37 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
0 votes
1 answer
610 views

Bootloader onto an ATmega328p (3.3V/8MHz), the dude won't finish his business

Hi and thank you reading my question ! I need for my projects to design as small as i can. Both the skills, and the hardware counts. So i can't use a DIP package for them, and i have gone for a TQFP ...
Hugo Vernier-Lambert's user avatar
-1 votes
1 answer
81 views

Can i exchange my arduino nano for an atmega328p-pu in my project?

Im currently trying to make a smart light switcher that is attached in front of my rooms light switches. It basically mostly consists of two servos (to turn on or off either switch), two button (to ...
Marcelo_M's user avatar
  • 121
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 ...
Amrutha B V's user avatar
2 votes
0 answers
163 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
0 votes
2 answers
215 views

Possibly fried a new atmega328p?

I have a new atmega328p IC that I wanted to program. To do so I placed it into the socket of an arduino uno. I accidentally placed it the wrong way around (180° rotated), and powered it via USB and ...
flawr's user avatar
  • 107
1 vote
0 answers
429 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
0 votes
1 answer
60 views

Using PortB as a sink, not working

Out of ideas here, i try using PB0-3 as sinks for a LED matrix and the pins just won't sink. My test code: void setup() { //bitClear(SPCR, 6); pinMode(PD5, OUTPUT); pinMode(PB0, OUTPUT); ...
BastetFurry's user avatar
0 votes
2 answers
695 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 ...
user2268171's user avatar
0 votes
3 answers
374 views

Is it possible to connect a 36 pin 4 digit 7 segment display on an Arduino Uno R3?

First of all,here's the datasheet of the 4 digit 7 segment display that I'm using: http://www.kingbrightusa.com/images/catalog/SPEC/ca56-11ewa.pdf How can I make a counter or a clock out of this ...
Neri-kun's user avatar
1 vote
1 answer
144 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 ...
Miguel's user avatar
  • 209
-1 votes
1 answer
222 views

Atmega328 standalone not working unless Pin1 connected to Arduino RESET

I'm new into this domain field. My principal occupation is as a .NET developer. I'm trying to do a personal project in which a AtMega328 takes some output from a scale using HX711 and sends a SMS via ...
AndreiMusat's user avatar
5 votes
3 answers
11k views

What to do with Arduino floating pins?

I have some unused pins, should I connect them together and to the ground or leave them floating?
ElectronSurf's user avatar
6 votes
2 answers
2k views

Can we burn Arduino bootloader into any microcontroller chip?

I am new to this Arduino community I noticed on youtube that while the prototype is complete people purchase new ATmega328p chips and flash bootloaders into them using in-system-programmers so that ...
Ravikiran's user avatar
  • 195
-1 votes
1 answer
420 views

ATmega328P-PU blink example not working

I moved from an Arduino to a bare ATmega328P-PU (to save energy). First I wanted to start a blink-script to verify that it's all working. For this I flashed the bootloader and uploaded the blink-...
Cowboy_Patrick's user avatar
1 vote
0 answers
150 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
3 votes
3 answers
523 views

What is the correct way to interpret the built-in Analog-to-Digital Converter output?

When using the built-in analog to digital converter of the Arduino Uno Rev 3's Atmega328P with a reference voltage of 5V, what is the appropriate function to interpret the output? There is conflicting ...
statueuphemism's user avatar
0 votes
2 answers
480 views

Bootloader difference between Atmel328p(through hole) and Atmel328p au(smd)

It’s been bugging me lot that Can’t we burn the same bootloader for both 328p and 328p au? I got confused when I see this linksmd 328p au bootloader burn. Will there be any impact on performance or ...
Learner's user avatar
  • 113
1 vote
0 answers
604 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 2
3
4 5
10