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
0
votes
1answer
25 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
25 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
27 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 ...
1
vote
2answers
39 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 ...
0
votes
1answer
24 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
9 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
52 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
45 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 ...
0
votes
1answer
23 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
25 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
41 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
78 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
28 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
87 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
82 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
51 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
91 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
23 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 ...
5
votes
2answers
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 ...
0
votes
1answer
53 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-...
1
vote
0answers
63 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 ...
2
votes
3answers
125 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 ...
0
votes
2answers
63 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 ...
0
votes
0answers
85 views

Implementing pluseIn using interrupt

I am trying to implement pluseIn using an interrupt. I tried attaching an interrupt in CHANGE mode. The time when the signal goes HIGH is recorded as raising time and the time when it goes signal LOW ...
0
votes
0answers
72 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 ...
0
votes
1answer
74 views

Atmega328p Uploads via ISP but not bootloader

I'm trying to upload a bootloader to my atmega328p on a custom pcb containing external oscillator at 16MHz. It is possible to upload program via ICSP pins using Arduino as ISP (Official Arduino Uno) ...
1
vote
1answer
305 views

Using usb port to communicate with standalone atmega328p circuit

noob here So I managed to get my circuit to be a standalone circuit (as pictured below). I want to use this circuit as an input to a game on my computer. What I want to know is could this micro-usb ...
0
votes
0answers
58 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: ...
0
votes
0answers
193 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 ...
-1
votes
1answer
40 views

What Arduino and shield components are worth recycling?

I'm building up a nice collection of smoked or otherwise bricked Arduino boards. I would like to save bits that might be useful later. I've desoldered a barrel plug to use when I want to separate the ...
0
votes
2answers
1k views

What is difference between ATMEGA32 and ATMEGA328?

I'm new in electronics. Just playing with Arduino boards.I just wanted to program ATMEGA328 micro-controller and use it without Arduino for compact design for my personal hobby project. I found there ...
0
votes
1answer
41 views

Atmega 328P in Arduino

Does anyone know what it means by the Atmega 328p has 131 instructions? And could you give an example of how any one of these 131 instructions look like? Thanks in advance!!
1
vote
2answers
204 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 ...
0
votes
3answers
54 views

ATmega328P - Problem using timer 2 for tone generation

I'm simply trying to use timer 2 for tone generation and what I get is a very faint and strange tone (almost like its modulated somehow as there is a "pulsing" to it). Here's my simple code: #include ...
0
votes
2answers
570 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
1answer
63 views

Is it possible to load both the arduino bootloader and a sketch onto an atmega328p via icsp?

i am familiar with uploading an arduino bootloader onto an atmega328p using another arduino via the arduino IDE. i have also installed software 'sketches' using that process which i believe leaves out ...
0
votes
1answer
50 views

Can't get OC1B (pin 10) to output

I'm trying to get this program to use channel B for the output waveform using the phase correct PWM mode and using OCR1A as the top. With a 50% duty ratio I'm attempting to get a 10 Hz freq. I'm able ...
0
votes
0answers
84 views

Nick Gammon Atmega bootload uploader, Why 5v is required instead of 3.3v?

I am trying to upload boot-loader to AtMega328p SMD chip. I want it to work with internal 8Mhz clock and 3.3v as VCC. By referring Nick Gammon's forum I have wired the connection but given VCC as 3.3v ...
0
votes
1answer
105 views

Can't use Arduino nano as ISP because it can't read the Device signature

I programmed the 8mhz internal oscillator Bootloader to a new Arduino Nano with another Arduino nano running the ISP Sketch, wich worked fine the first time(Arduino as ISP selected as programmer). (I ...
0
votes
1answer
28 views

When does interrupt get fired

When does the ISR mapped to SPI_STC_vect (SPI transmission complete) get fired? Does it fire after a byte has been received (eight clock cycles) of when the slave select changes back to high to ...
2
votes
2answers
113 views

Which Datasheet applies to the ATmega328p?

While researching minimum-voltage requirements of Uno, I came across what appear to be two datasheets for the ATmega328P: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-...
0
votes
0answers
40 views

AVR program upload overrides unrelated program area

I develope a new bus system (uartbus) which includes a host application that can handle new program uploads throught the bus. How it's work in short: The host application flashed to the AVR. This ...
0
votes
1answer
39 views

Flash size in boards.txt ATmega 328p 32u4

The ATmega328p and ATmega32u4 microcontroller have 32Kb of flash memory (as datasheet). Bootloader for each microcontroleer has different size (about 512 byte for 328p and 4kb for 32u4). Why in ...
4
votes
2answers
172 views

Is there a way to add external RAM (let's say 100 MB or 200 MB) in this audio buffer mixing context?

I'm coding a music sampler device: for fast playback / minimal latency (only a few milliseconds), it's better to have all audio .wav samples we want to use in RAM, so that when some of them are ...
2
votes
2answers
359 views

Change the fuses of an Arduino Uno (can an Arduino Uno change its own fuses?)

For now, I'm using an Arduino Uno alone including its 328p (no other external chip to program). I would like to change its fuses to internal 8 Mhz clock (because then I'll move the 328p out of the ...
0
votes
2answers
316 views

Using an Arduino Nano to program (as ISP) a standalone 328p

I uploaded the ArduinoISP sketch to an Arduino Nano to use it as a programmer for other chips. It worked successfully to program an ATtiny45, I did the usual wiring between them, and added a 10uF ...
0
votes
1answer
170 views

24/14 second countdown timer or shot clock for basket ball start/stop button doesn't respond well

Start button doesn't respond correctly, i can't figure out whats wrong with the code ? pls help, this code is for 24 second and 14 second countdown timers in a same unit comes with three physical ...
1
vote
2answers
1k views

How can I program a ATmega328 au tqfp32 ( SMD ) chip? [closed]

I have some experience with the Arduino UNO , Nano , mega etc .. But today I want to upgrade my skills and knowledge to next level . So I am about to design my own PCB for ATmega328 au ( SMD ) but ...
-1
votes
1answer
168 views

Error while reburning bootloader to atmega328p by usbasp in Arduino IDE

I have got the Bootloaded ATMega328P-PU from China and I want to reburn new bootloader into it. For this I use UsbAsp programmer. I want to do it in Arduino IDE. But when I try to flash, for example, ...

1
2 3 4 5
8