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
0 answers
188 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: ...
E.M.'s user avatar
  • 11
1 vote
0 answers
1k 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 ...
Asyu7's user avatar
  • 33
-1 votes
1 answer
133 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 ...
haresfur's user avatar
  • 101
0 votes
3 answers
11k 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 ...
Pradeep Sapkota's user avatar
0 votes
1 answer
57 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!!
Zephyrus Xanthar's user avatar
6 votes
3 answers
9k 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 ...
Basj's user avatar
  • 398
0 votes
3 answers
634 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 ...
Andrew M.'s user avatar
  • 145
2 votes
3 answers
4k 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 ...
Adriano's user avatar
  • 316
0 votes
1 answer
373 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 ...
Danny's user avatar
  • 3
0 votes
1 answer
382 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 ...
Tomas Breit's user avatar
0 votes
1 answer
644 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 ...
Lukas Kamina's user avatar
0 votes
1 answer
83 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 ...
Sim Son's user avatar
  • 1,829
2 votes
2 answers
317 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-...
dotancohen's user avatar
1 vote
0 answers
57 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 ...
Dankó Dávid's user avatar
0 votes
1 answer
303 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 ...
Mario J.'s user avatar
3 votes
2 answers
2k 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 ...
Basj's user avatar
  • 398
2 votes
3 answers
3k 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 ...
Basj's user avatar
  • 398
0 votes
2 answers
1k 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 ...
Basj's user avatar
  • 398
1 vote
0 answers
746 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 ...
Amal R's user avatar
  • 11
1 vote
2 answers
8k 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 ...
Ravikiran's user avatar
  • 195
-1 votes
1 answer
347 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, ...
E.M.'s user avatar
  • 11
1 vote
1 answer
367 views

Unable to burn bootloader with avrisp

I want to burn the arduino optiboot_atmega328.hex bootloader but it doesn't work. I remember that I was able to burn the BL using the arduino IDE which was quite easy, this time I'm having some ...
Sim Son's user avatar
  • 1,829
0 votes
4 answers
4k views

I need help programming my arduino in assembly [closed]

I am new to using an Arduino and I am trying to program my it to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a ...
user58745's user avatar
0 votes
1 answer
2k views

Programming the ATMega328P without Arduino board always returns the error: avrdude: stk500_recv(): programmer is not responding

I have a microcontroller: ATMega328P. I don't have any Arduino Uno board. I want to program the ATMega328P using my FTDI programmer. But when I try to program the ATMega328P without Arduino board I ...
waas1919's user avatar
  • 133
1 vote
2 answers
406 views

maximum interrupt-based PWM frequency at 500 Hz

I need to control a 24 kHz ultrasonic transducer and decided to use an arduino uno I have lying around. Using tone() or the atmega's hardware pwm is not very suitable because I need two 50/50 square ...
Sim Son's user avatar
  • 1,829
2 votes
1 answer
1k views

How do I properly trigger the ATMega328 reset pin via software so that the bootloader runs and the firmware can be updated via RX/TX pins?

I am programming my Atmega328P chip via a USB to TTL converter (https://www.amazon.com/gp/product/B075N82CDL/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1) I am able to upload hex files via ...
Jalconvolvon2's user avatar
0 votes
2 answers
2k views

Why the SoftwareSerial is not working properly on Arduino Pro Mini 3v3?

I uploaded regular pass through code for Serial and SoftwareSerial to communicate with my AT command based module. Writing to SoftwareSerial seems to be working but reading not. As I write "AT", the ...
A. L. K.'s user avatar
0 votes
2 answers
74 views

Atmega collecting and relaying interrupt calls

I like to collect all possible interrupt and relay them to an alternative handler interrupt table what the user can set. In order to do this i have to: 1) collect all/any interrup request 2) ...
Dankó Dávid's user avatar
1 vote
1 answer
268 views

Timer 1 COMPA ISR - default behaviour?

I'm creating a LCD frequency generator. When TIMER1 reaches a set value, it's set to toggle Pin 9 (via OC1A). Accidentally, I left the TIMER1 "interrupt on compare match A" enabled, but never ...
towe's user avatar
  • 863
0 votes
1 answer
848 views

Burning bootloader and uploading sketch on ATMEGA328

I have a ATMEGA328-PU (not a atmega328P-PU) and managed to install the boot loader on it using an Uno as ISP, but now i can not upload any sketch, this are the steps I've done so far: connected this ...
ElectronSurf's user avatar
5 votes
3 answers
18k 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 ...
ElectronSurf's user avatar
1 vote
0 answers
51 views

freeRTOS tasks never run on Lightblue Bean

Although Punchthrough no longer supports the Bean and Bean+ they still maintain the online compiler and reference materials: Bean Github Bean reference One of the external libraries they've included ...
Taryn's user avatar
  • 111
1 vote
0 answers
40 views

Mistaken Connect 5V to SCK Pin

i have old chinese old hotair station that controls by atmega8l 8ua chip.. and the board designer are clever enough to put 2 identical dc plug, 1 is 5v supply cable.. the other one is on off switch ...
Noviardi Tan's user avatar
1 vote
1 answer
390 views

Bit Number to Byte Value conversion (AVR Docs)

I have hard time to understand what this doc tells me: https://www.microchip.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_use_bv.html I has a macro called _BV that convert a bit number (usually ...
xetra11's user avatar
  • 167
0 votes
1 answer
423 views

Atmega328p and cp2102 with error avrdude: stk500_getsync(): not in sync: resp=0x00 [closed]

I recently bought a usb/ttl cp2102 converter for testing with a standalone Atmega328p, I made the DTR connection with the pin 1 in the Atmega using a ceramic capacitor of 0.10uf (104) so that when I ...
user2831852's user avatar
0 votes
2 answers
194 views

Arduino nano / uno analog pin

I'm working on a project where I need 7 analog pins. I read the datasheet of Ardnuino Uno : 6 analog pins available. So I decided to use an arduino mega with 16 analog pin available. Then I saw the ...
vib's user avatar
  • 113
2 votes
0 answers
514 views

Clear Timer on Compare or CTC in ATmega328P, Toggle OC0A on Compare Match

I want to use the CTC on the ATmega328P to play same notes with a speaker, a project that I find in this book. In the data sheet I read: For generating a waveform output in CTC mode, the OC0A ...
Ugo Mela's user avatar
2 votes
1 answer
282 views

Arduino as ISP - program is being uploaded on Arduino, not breadboard

I am following this tutorial, and have wired Arduino using this diagram: This is what it looks like: These options are selected in Arduino IDE: This is the program I'm uploading: // the setup ...
Tomáš Zato's user avatar
1 vote
0 answers
172 views

Using a 48 characters char[] for PROGMEM

I am trying to create a charliplexed display of 6x8 LEDS using a Arduino Nano with the ATMega328p chip. Because of the limited storage I am trying to use PROGMEM. I did my research and found some ...
sdieters's user avatar
1 vote
1 answer
206 views

Force TCNT to stay below OCRxA on ATmega328P

I'm using a timer and the TIMERx_COMPA ISR to generate a signal in "the background". This ISR is triggered when the timer reaches a certain value (OCRxA), which in turn can be changed by the user. ...
towe's user avatar
  • 863
0 votes
2 answers
200 views

Arduino and Solenoid Water Valve

I use Arduino UNO and two SPST Relay (Wemos Mini D1 Relay) to make the reverse polarity circuit. I use this circuit to open and close the Solenoid Water Valve (SWV), which work with 9 to 12 volt. The ...
user42037's user avatar
4 votes
1 answer
428 views

What does "Update of OCR1x at" mean in the WGM table of ATMEGA328?

I just finished a reading a couple of online guides on how to use timer registers with pulse width modulation, so I'm still new to its concept. When I looked in the ATMEGA328 specification sheet, I ...
John's user avatar
  • 173
1 vote
1 answer
588 views

Arduino New Optiboot Bootloader on custom ATMega328p board, ATMEL Studio and AVRdude [closed]

I am about to ask a kind of complex question due to the number of system parts involved and the system architecture I am planning to use. First of all I have a tiny bit of experience with the Arduino ...
grpolylogic's user avatar
-1 votes
1 answer
135 views

Uploading bootloader to ATMEGA328 P

I have a duemilanove which originally had a 168. I have some ATMEGA328 P chips and I've put one into the duemilanove. I am using a Uno as a programmer for the duemilanove. I am running Arduino 1.8....
peterfelgate's user avatar
0 votes
0 answers
452 views

ATMega328 AU bootloader burning issue using Nano

We are trying to burn bootloader into ATMega328P-AU SMD. We have taken the reference of the link and did the same. We checked wire connections and all looks fine and we tried with two chip with two ...
Learner's user avatar
  • 113
5 votes
2 answers
2k views

Run code once after programming

I'm using EEPROM to store project settings non-volatile. After reuploading the sketch to my board (over SPI via ArduinoISP), the EEPROM is reset to full 0xFFs and I have to manually do a "software ...
towe's user avatar
  • 863
1 vote
0 answers
164 views

Multiple Atmega328p wired communication

I am using multiple ATMEGA328Ps (4 ATMEGA328P) (OR Arduino Unos). The distance between two farthest ATMEGAs is 14 meters (One is Master Device and Other is Node), and other 3 are connected to each ...
JavaEnthusias's user avatar
0 votes
1 answer
46 views

please help with my arduino

My problem is when I run code like this: char directioN; void setup() { Serial.begin(9600) } void loop() { if (Serial.available()) { directioN = Serial.read(); switch (...
nour albrmky's user avatar
1 vote
0 answers
34 views

My ArI was using a potentiometer and the system shorted maybe. Do I have to replace the USB interface chip? It doesn't reset also

See I was using a micro analog rotary potentiometer to control a servo. The pot was in a pcb. The 5v output and gnd were connected to arduino from the pot. The third pin and 5v got touched and it got ...
Supragy Mishra's user avatar
0 votes
1 answer
1k views

Arduino hangs after some time

I am using Atmega328p with 5V power supply, My Arduino getting hangs [or auto restarts] after some times. I am using libraries: Wire.h CRC32.h EEPROM.h Arduino.h TimerOne.h RtcDS3231.h ...
Dharmendra Savaliya's user avatar

1 2 3
4
5
10