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
1answer
27 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
86 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
41 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
39 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
39 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
45 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
1answer
25 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
17 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
58 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
435 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
21 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
20 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
38 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
37 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
19 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
38 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
34 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
48 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
45 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
31 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
54 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
65 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 ...
2
votes
0answers
61 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 ...
1
vote
1answer
102 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 ...
0
votes
0answers
38 views

BLUNO Beetle V1.1 BLE seems defective, Bluno Beetle V1.0 works fine

I have previously had the Bluno beetle V1.0 before which works fine. I have just bought 3 Bluno Beetle V1.1 mc's, but the BLE is not discoverable. I have gone through the same process to update the ...
0
votes
0answers
20 views

Installed configuration won't show up on Board menu

So I was following these instructions on the official site. Download this hardware configuration archive: breadboard-1-6-x.zip, Breadboard1-5-x.zip or Breadboard1-0-x.zip depending on which IDE you ...
-1
votes
1answer
77 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....
1
vote
0answers
117 views

Measuring battery voltage [closed]

I am trying to use this way to measure my battery voltage at least approximately, but I am getting weird results. I am running breadboard atmega328p with internal 8 MHz and powering it from a LiPo ...
0
votes
0answers
200 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 ...
5
votes
2answers
1k 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 ...
0
votes
0answers
48 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 ...
0
votes
1answer
39 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 (...
0
votes
0answers
18 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 ...
0
votes
0answers
20 views

How can I merge my two scripts: Basketball Timer & Basketball Scorer?

I have a project in arduino, an arcade basketball machine using 4" Single-7-Segment Displays driven by IC 74HC595N. The purpose of my program is to record the score by merging 2 SSDs at the same time ...
0
votes
1answer
170 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 ...
0
votes
0answers
36 views

Making a ATMega328P-PU and computer communicate but not by standard serial communication

So i have been trying to make a ATMega328P-PU using the Arduino bootloader and a computer communicate the same way brands like Logitech and Razer makes their mouse's and keyboard's communicate with ...
1
vote
1answer
82 views

Arduino Program Memory Ran Out

I have a Arduino sketch I made and I have run out of dynamic memory on my Arduino Nano. How could I possibly reduce the amount of memory the program takes? (I'm not that good at this stuff) P.S: The ...
0
votes
1answer
194 views

error 404 in HTTP GET request with Arduino Uno and ESP8266 using AT commands

when I try to send http get request I get error 404 AT+CIPMTX=1 OK AT+CIPSTART=4,"TCP","alirezaabrhshami.ir",80 4,CONNECT OK AT⸮⸮R5U9⸮⸮b⸮⸮j OK > Recv 47 qytes SEND OK +IPD,4,223;HTTP/1.1 404 Not ...
0
votes
0answers
35 views

Programming an EL Sequencer

I have a EL Sequencer and FTDI 5V breakout board. I have been have been unable to program it. All my attempts get some variation of "programmer is not responding". I was using these instructions as ...
0
votes
1answer
62 views

ATMEGA 328P Standalone on 3.3v controlling a servo

I'd like to use an ATMEGA 328P on standalone mode powered by a 3.3V supply source to control a servo (which is powered by 4 AA batteries, resulting in 6V). My question is: do I have to convert the PWM ...
0
votes
1answer
88 views

NRF51822 ± Arduino Uno / ATmegaXXX?

Hello I want to make a simple home automation project and I'd like to use an arduino uno for prototyping and later a atmega for deployment. I need some sort of a mesh communication method. I was ...
1
vote
2answers
119 views

Arduino write to memory and self shut down (over MOSFET) - An idea help

i would like to ask you for help with design of an circuit. I have and atmega328p, with detection for voltage on its Vin (Vcc). I have made and voltage divider and its output i connected to Analog ...
1
vote
1answer
67 views

Dimmer.h issues with ATmega 128

I am using a ZCD circuit controlling a TRIAC. Now I am using Dimmer library for this purpose. It works fine with ATMega 328 but whenever I try to upload the code in ATMega 128 using Arduino IDE this ...
-1
votes
1answer
146 views

Standalone 328P Arduino

I am creating a standalone Arduino using Atmega328P. The circuit is below. However, I'm seeing avrdude: Device signature = 0x000000 error whenever I try to burn the Arduino Uno bootloader. I'm ...
1
vote
1answer
355 views

ESP8266 Software serial to ATmega 328 is not properly working

Thanks in advance.. We are having esp8266-12E chip and Atmega328 connected as follows, ESP 12 pin as Tx,13 pin as Rx && Atmega328 13pin as Rx, 12pin as Tx. Everything works fine, but while ...
0
votes
1answer
104 views

USART, SPI or Bit-Bang for the continuous transfer of bytes without inserted extra bits

I have heard that The SPI hardware introduces a 9th, HIGH bit between bytes USART still uses start and stop bits when in synchronous mode Are both these statements true? Can I modify the built-in ...
0
votes
1answer
76 views

Burning bootloader

I'm using arduino atmega 328p and currently using on custom PCB I programmed using the arduino board and take the IC and migrated to my custom PCB currently the program run well on the arduino board ...