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
0answers
25 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
31 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
43 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
33 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
34 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 ...
0
votes
1answer
36 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
44 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
37 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
62 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
27 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
56 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
38 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
25 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
69 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
62 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
24 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
75 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
39 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
31 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
141 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
82 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
54 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
77 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
304 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 ...
0
votes
1answer
86 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
vote
1answer
45 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 ...
-1
votes
4answers
462 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 ...
0
votes
1answer
96 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 ...
1
vote
2answers
54 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 ...
0
votes
1answer
60 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 ...
0
votes
2answers
59 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 ...
0
votes
2answers
43 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) ...
1
vote
1answer
26 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 ...
0
votes
1answer
106 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 ...
1
vote
2answers
2k 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 ...
0
votes
0answers
26 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 ...
0
votes
0answers
29 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 ...
1
vote
1answer
30 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 ...
0
votes
1answer
64 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 ...
0
votes
2answers
83 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 ...
0
votes
0answers
25 views

Moving timer-related code into a separate file causing timing inconsistencies?

I have written the following code, attempting to re-implement the Arduino micros function: main.c #include <avr/interrupt.h> #include <stdbool.h> #define CLOCK_CYCLES_PER_MICROSECOND (...
0
votes
0answers
34 views

Arduino Nano v3 not being detected at any COM ports

My Arduino Nano v3 is not being detected anymore at any COM ports in Arduino IDE 1.8.9. There are 4 LEDS onboard; RX, TX, Power and L. The first 3 LEDS are always on. The L one stays off. After some ...
1
vote
0answers
60 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 ...
0
votes
0answers
20 views

Arduino Swarm - WiFi and Embedded Communication

I'm developing an Arduino-based swarm, each bot having 1 ATMEGA2560 as its main processor and 1-2 ATMEGA328 as sub-processors and a variety of sensors and actuators, with WiFi (LAN) connection in a ...
0
votes
0answers
41 views

Is it possible to send data at 100Hz using Wifi bee ESP V1.0 to Mobile (Xamarin)?

Im currently using WifiBee ESP V1.0 and Lilypad Arduino as well as AD8232 for ECG. We are trying to send the data to mobile phone by connecting to PubNub.` if(Serial.available()>0){ str = Serial....
1
vote
1answer
54 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 ...
0
votes
0answers
57 views

Why can you use FTDI with an ATMega328 with no external crystal?

I have read that serial (UART) communications are unreliable or will not work when using the 8MHz internal oscillator as the clock source. For example here are two results from a quick google. http:/...
0
votes
0answers
43 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 ...
1
vote
1answer
68 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. ...
0
votes
2answers
83 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 ...