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
2answers
34 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 . ...
1
vote
1answer
70 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 ...
2
votes
2answers
57 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?
8
votes
3answers
215 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 ...
1
vote
1answer
24 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 ...
-1
votes
0answers
18 views

Arduino mega as isp to program 328p

Hiii friends I am programming atmega328p using arduino mega as isp for long time Today ... It suddenly showing invailed device signature ..... So.... I tried another atmega328p and it worked..... But ...
0
votes
0answers
18 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 ...
3
votes
1answer
62 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 ...
-1
votes
3answers
51 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 ...
1
vote
1answer
30 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 (...
0
votes
0answers
49 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 ...
3
votes
1answer
79 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 ...
1
vote
0answers
47 views

avrdude not in sync

So this uno was working before, now i can't upload anything, can't even burn the bootloader. Using another arduino as isp does not work. It always says avrdude: stk500_recv(): programmer is not ...
2
votes
1answer
32 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 ...
1
vote
2answers
61 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 ...
0
votes
2answers
75 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 ...
0
votes
0answers
27 views

http request with the A6 gsm module

I have been trying to implement a simple HTTP get request with an A6 GSM module, and am finding it very difficult, i couldn't get any useful docs or tutorial online to guide me through, all i could ...
0
votes
1answer
29 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() { ...
0
votes
0answers
79 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/...
5
votes
2answers
133 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 ...
1
vote
1answer
52 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 ...
0
votes
1answer
69 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 ...
1
vote
1answer
46 views

EMI resets atmega on switching ON relay with inductive load like a 230v fan

I am making an automation device. I am using an atmega8a to control 6 relays. The setup is standard, 220v load, 5v dc coil, flyback diode and an NPN transistor to trigger with atmega pin. The problem ...
0
votes
2answers
62 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?
1
vote
1answer
60 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 ...
0
votes
1answer
32 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&...
0
votes
0answers
44 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 ...
0
votes
0answers
36 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 ...
0
votes
0answers
27 views

Prevent reading flash from Arduino (Pro Mini for example) with fuses

The situation is the following: I'm uploading code to Arduino board using USB programmer which communicates with the board via Tx/Rx serial (so boot-loader remains on the board). I want to prevent ...
-1
votes
1answer
78 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 ...
2
votes
1answer
65 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 ...
0
votes
1answer
35 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 ...
0
votes
1answer
40 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: ...
0
votes
1answer
45 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 ...
0
votes
2answers
170 views

Serial printing from Flash Memory (F() macro, PROGMEM, sprintf_P, SPTR)

I have been testing on an Arduino UNO various techniques 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
1answer
37 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 ...
0
votes
0answers
11 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.
0
votes
1answer
212 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 ...
0
votes
1answer
68 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 ...
1
vote
1answer
31 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 ...
2
votes
0answers
43 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 ...
0
votes
2answers
59 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 ...
0
votes
0answers
124 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 ...
0
votes
1answer
32 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); ...
0
votes
2answers
146 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 ...
0
votes
3answers
126 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 ...
0
votes
1answer
57 views

Keep 5V on while sleep with LowPower library

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 ...
-1
votes
1answer
104 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 ...
5
votes
3answers
9k 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?
0
votes
0answers
28 views

Use SIM800 module with bare ATmega328

I want to migrate from an Arduino Uno to a bare ATmega328 to save energy. I already tested it with a script that blinks and puts out a few chars on the serial connection. The LED blinked and with a ...

1
2 3 4 5
9