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
2 views

interrupt-based PWM has wrong frequency

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
34 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 ...
1
vote
2answers
601 views

Does the reset button work when not powered?

I'm working on a project and my dad hit the reset button on my Arduino board, unknowingly. If it wasn't connected to any power source or computer, did it still reset? Do I have to upload my code to ...
1
vote
2answers
3k views

Bluetooth module(HC05) works with Arduino Uno but not with breadboard (ATmega328)

I am currently working on a project that requires communication between an android phone(galaxy s4) and an ATmega328 microprocessor. To connect these devices wirelessly I'm using an HC05 bluetooth ...
0
votes
2answers
43 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
22 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
16 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
51 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
264 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 ...
1
vote
2answers
1k views

16Hertz Uno R3 Board vs Arduino Uno R3 Board

I bought a 16Hertz Uno R3 Board. When I installed the driver and the Arduino IDE, in the IDE`s menu I saw: Tools -> Board -> Arduino Uno was selected by default which is great, but... ...
0
votes
0answers
19 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
27 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 ...
1
vote
0answers
165 views

Garbage when listening to serial

This is the atmega328p code that is supposed to send a predefined message repeatedly. #include <avr/io.h> #include <util/delay.h> #define BAUD 9600 #define BAUD_PRESCALLER (((F_CPU / (...
1
vote
0answers
342 views

Cannot upload to otherwise working bootloaded ATmega328P via RS232: “programmer is not responding”

I have an ATmega328P on a breadboard with the following circuitry around it: The ISP is a Tiny AVR Programmer. The RS232 to USB converter is this thing. Following is the test program I use: void ...
1
vote
0answers
113 views

Why does I2C On Nano Fail with LiquidCrystal_I2C library unless Nano runs at 8Mhz?

I have an Arduino Nano (running by default at 16Mhz). I am connecting a 20x4 LCD screen via I2C (using A4 for SDA and A5 for SCL). Here's the very simple code (which was previously only showing black ...
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
30 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
33 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
17 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
35 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 ...
2
votes
1answer
3k views

Cannot open the serial monitor and get error “Board at COM 3 is unavailable” (3rd party Arduino)

I am using a 3rd party Arduino board made by Stensat (from their experimenters kit). The documentation that comes with it says that in the Arduino environment, the board that should be selected is the ...
0
votes
0answers
17 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
28 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
2answers
283 views

Unable to Upload

Not able to upload sketches to standalone arduino on breadboard (with Atmega328 bootloaded with blink LED program). Searched on the internet but there is no solution. Help ? error : avrdude: ...
1
vote
2answers
757 views

Arduino Uno Reading Fuses

I am trying to read the fuse values for the Arduino Uno, but keep getting the following results returned back to me: enter code hereavrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24 ...
3
votes
2answers
2k views

Atmega328P-PU: Programmer is not responding

Few days ago, I built my own custom Arduino on the breadboard. It is built according to tutorial on http://www.crash-bang.com/resource/breadboard-arduino/. The Atmega328P-PU is already burned with the ...
1
vote
1answer
44 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 ...
-1
votes
1answer
142 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 ...
0
votes
0answers
43 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
1answer
4k views

ESP8266 Serial Communication with ATMega328P

I am isolating the ATMega328P from the Arduino Uno. I have used it for many other projects, so it does work as intended. Also, I have used my ESP8266-01 for other projects and works great (including ...
0
votes
1answer
1k views

Arduino crashing and rebooting

I have recently written a program which is supposed to change the duty-cycle to keep the feedback voltage measured on A0, A1 constant. The problem is that the Arduino will start crashing at pretty ...
0
votes
0answers
30 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
votes
1answer
75 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....
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 ...
1
vote
1answer
51 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 ...
0
votes
1answer
351 views

SIM800C, CPIN: NOT READY (ERROR CODE : +CME ERROR: 10)

I'm using a SIM800C module, and usually it works fine, but lately it has started giving the error "+CPIN: NOT READY" with ERROR CODE : +CME ERROR: 10(SIM NOT INSERTED). As soon as I get this message, ...
2
votes
0answers
54 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
85 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
28 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 ...
2
votes
1answer
840 views

Vcc measurement with internal 1.1V reference fails on 3.3V powered Atmega328

I need to monitor a battery plugged to an ATmega running on standalone mode. I use the "ATmega on a breadboard (8 MHz internal clock)" bootloader. More info here When the ATmega is powered with 5V ...
1
vote
0answers
86 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
176 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 ...
0
votes
0answers
43 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 ...