Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

0
votes
1answer
24 views

How to upload program to custom arduino board without USB FTDI and making it read only? [duplicate]

If I was to mass produce a microcontroller board I have designed based around the atmega328 (very similar to an arduino uno) but for one embedded task where I want one program only to be stored on it. ...
1
vote
1answer
36 views

How to interface USB to custom Arduino Uno Schematic and programming atmega?

I'm fairly new to designing schematics and working with the atmega on its own and I'm designing an arduino schematic on eagle. Ive gotten to the stage where I need to incorporate a TTL USB interface ...
0
votes
2answers
27 views

freeMemory() function from memoryfree library not returning decreased value in arduino UNO

I burned the code written below, I expect that as we declare the local variable in the loop, freeMemory() function should return decreased value. But it remains constant..! please explain why..? The ...
0
votes
1answer
13 views

MemoryFree library showing Irregular Behaviour..!

I simply burned the code written below but it is showing me irregular behaviour.. as in output's last paragraph, free memory increases after a runtime allocation, how it is possible? The output is ...
0
votes
0answers
31 views

MemoryFree library showing free memory more than capacity of Atmega328Pu MCU

I simply burned the code written below but it is showing me free memory as 2299 bytes please somebody clarify that how in an Atmega328pu can have 2299 bytes free with an overall capacity of 2048 bytes....
3
votes
4answers
110 views

Where in datasheet is the warning about unreliability of reading PINxn?

I use atmega32u4 (but believe it applies to all models). Here is the datasheet. Consider the following C program (I use AVR-GCC 5.4.0): #include <avr/io.h> int main(void) { PORTB |= 1 <&...
0
votes
1answer
36 views

stk500 getsync() attempt 10 of 10 atmega328pu

I've been getting this very common error on my atmega328pu circuit. avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x83 Some things ...
1
vote
1answer
49 views

DHT11 Sensor : Stand-by or Shut down?

I have an ATmega328P monitoring room temperature and humidity. It is enough for me to monitor every 8 seconds. In these 8 seconds, I am putting my Atmega to sleep. Now , I want to know : Does ...
0
votes
1answer
28 views

Accidentally shorted 5V to GND on Arduino Nano, can I reuse the ATmega328p?

I've shorted 5V to GND and the Arduino Nano (CH340 clone) stopped working (power LED light is dimming). The board had a burning smell, and I also checked if other Arduini on the same USB port worked ...
0
votes
3answers
41 views

Can't burn Bootloader on Atmega328P Using Arduino Uno

I'm trying to create an Arduino Uno following the circuit described in the diagram below which I'd based from here. I'd tried this circuit on an Atmega328 PDIP version (with the correct connections ...
0
votes
1answer
43 views

Arduino and AVR Serial Communication over USB

I have a Arduino Uno Rev3 and I would like to use a AVR development toolchain to write a program that performs serial communication over USB. Doing this using the Arduino IDE is fairly simple: void ...
0
votes
0answers
24 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, ...
-1
votes
3answers
55 views

cant find what is error on my code [closed]

im working on project which include using of motors and a float switch im getting an error message which expected '}' at end of input . i cant find where should i correct it, btw im putting a float ...
1
vote
1answer
19 views

Arduino based IR remote control - Transmission issue

I created a circuit of a 25 key IR remote controller for my RuneAudio device. The device is a standalone ATmega328P-PU running at 3V (2 AAA batteries) with 8 MHz internal clock. The circuit has 5 rows ...
0
votes
1answer
61 views

Which platform is better to debug Arduino memory problems? Linux or Windows?

I am developing a product. I developed every module in the firmware individually. Now I am integrating them but getting memory issues. I am not able to see how the memory is allocated inside the MCU ...
1
vote
2answers
33 views

Powering Atmega328P-Pu externally [closed]

Please I'm new to Arduino and I need assistance. I'm working on a project which makes use of the ultrasonic sensor to make a certain pin high if a certain distance is attained. When I used the USB ...
2
votes
1answer
51 views

Generating 200 kHz pulse on Arduino Uno in normal mode

I need to obtain 200 kHz from Arduino Uno. I am using Timer0. I have configured it to run in normal mode and the Prescaler is set to clk/8 (the clock frequency of Arduino is 16 MHz). TCNT0 ...
0
votes
0answers
33 views

ATmega328p PD0 and PD1 usage

I would like to use pins RXD and TXD (PD0 and PD1 in ATmega328p) as inputs. I am using Arduino Uno to upload a code to my ATmega328p, after that I plug in ATmega to my circuit board. Arduino Uno is ...
1
vote
0answers
43 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 ...
0
votes
0answers
38 views

Is the ATMega328P powerful enough to deal with a lot of SPI data while reading a rotary encoder?

I need to: Output data to a 128x64 screen with ug8lib (via SPI) Keep track of the position of a high-precision rotary encoder (1024p/r) Send about 2 bytes of data up to 120 times per second via an ...
0
votes
0answers
6 views

Problems using Arduino pcb as ISP with Atmel Studio 7

This issue has been bugging me for the past few days! I have learned a lot with my Arduino and the Arduino IDE over the past few years and decided to learn how to make faster, leaner code. I want to ...
0
votes
1answer
48 views

Float magnet switch interrupts atmega328p and RN2483 sends data

It was so easy to my mind but it is really not. I have a float switch which goes high when water is floating. So I connect the switch to INT0 pin of MCU. So when water is not floating everything is OK....
0
votes
1answer
27 views

FTDI and atmega328p-au [closed]

I want to connect an Arduino Pro Mini with ATmega328P so as to drive a SI4463. But I don't know BLK, CTS, DTR should be connected to what pins of ATmega328P. How do I connect this?
0
votes
1answer
17 views

Using a channel relay

im using 4 channel relay to switch the motor pump. but when the arduino output is high and i check first with led. the led behavior were high too but when i attached to the relay input IN1, the ...
0
votes
2answers
43 views

Will analog servo work with Arduino servo library?

I ordered some cheap servos from Amazon before I noticed that there seemed to be two different kinds (digital & analog). Mine are Tower Pro SG90 Analog (http://www.towerpro.com.tw/product/sg90-...
1
vote
1answer
61 views

Timer2 Compare Interrupt not working as expected

To get this out of the way first: I have already looked at "Timer2 does not work as it should" and "Timer2 “Clear OC2B on Compare Match” not working as expected in CTC mode" but have not found the ...
-1
votes
1answer
100 views

transmit a sequence of bit using arduino uno [closed]

How do i code to transmit a sequence of bit using arduino uno?My project is about a transmitter and a receiver.Arduino as the transmitter and an application as the receiver.Light sensor will detect ...
0
votes
1answer
52 views

How reliable is Arduino Uno Serial, via USB (ATmega16U2), CRC needed?

I have a question about the reliability of Serial communication, i.e. in particular if I need to implement CRC/checksum/ECC because of bit transmission errors? I I however think there is no general ...
1
vote
1answer
41 views

How to get location of the hand indoors

I made a glove that tracks the positions of the fingers, but I don't know how to get the location of the hand relative to the person using them. Any suggestions? It should be quite accurate but I ...
0
votes
0answers
47 views

How to interface LCD?

I brought an ATmega328p chip today, which I bootloaded later on and I tried some basic circuit examples (like blink LED) with the chip (Minimizing the circuitry) and it worked perfectly fine. When I ...
0
votes
0answers
44 views

Use PWM to play notes on ATMega328

I have old speaker which I want to use to play sound. I chose to use PWM mode on ATMega328 (which is in turn on Arduino Uno R3 board) in order to do it. For signal on the speaker I chose rectangular ...
0
votes
1answer
47 views

Problem in bootloading 328p using Arduino as ISP. Please help me in figuring out the problem.I have uploaded the verbose below

Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno" C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -...
0
votes
0answers
79 views

failure to burn bootloader in ATMEGA328P on breadboard

As a novice to ATMEGA I try to use the arduino UNO (original) to burn a bootloader in a new ATMEGA328P on a breadboard. It is clear to me that SPI is used for this task and all connections have been ...
-1
votes
3answers
119 views

ATMega328P receiver and transmitter pins

I am trying to connect Bluetooth, GSM and GPS to the ATMega328P, but since it has only 1 RX and 1 TX, can I use the digital pins of ATMega328P as RX/TX pins.
0
votes
1answer
42 views

Arduino ISP external power

I want to program an atmega328p-pu via my arduino uno as ISP in a circuit. I omitted my connected sensors, LCD, etc in the schematic to keep it simple. When I power the circuit via a 5V power supply ...
1
vote
1answer
72 views

ATmega328 is not recognized by software

I installed the required drivers for the board. But I cannot still upload a program to the board. It says that avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53 Copyright (c) 2000-...
0
votes
0answers
46 views

DHT22 powered by Arduino pin uses MORE power while sleeping?

Experimenting with a low-power temp/humidity wireless sensor. Brief H/W description: ATMEGA328P chip (bare, int.8MHz clock) powered by LiPo cell. DHT22 with Vcc connected to Arduino Pin 9. NRF24L01+...
0
votes
1answer
75 views

Burn hex with optiLoader

Can optiLoader be used to burn custom hex? For example, there's hex representation stored in optiLoader.ino in image_328, if that value is replaced with content of my pre-compiled hex, should that ...
0
votes
1answer
256 views

Is there a way to disable modules like ADC without a sleep mode?

I'm working on a binary watch project. I want my circuit to live off of batteries for as long as possible, so I want to decrease the power consumption of my chip. I'm using a barebones ATmega328P-PU ...
0
votes
3answers
81 views

Switch case does not work after booting system

int value1; int value2; int runs1 = 0; int runs2 = 0; #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x3F, 16, 2); int inPin = 6; int val = 0; int push_count = 0; ...
0
votes
0answers
34 views

Is it possible to test SPI communication having only one board?

How do I study my Arduino device? I just read ATmega328 datasheet and tutorials for some theory and then try to implement it on my device - Arduino Uno R3 (with ATmega328 on board). Now I am studying ...
0
votes
2answers
50 views

Getting error 32 in multi-master I2C sketch with library https://github.com/rambo/I2C

I am developing a multi-master scenario sketch with the https://github.com/rambo/I2C library, because this library will handle multi-master data collisions. I created a setup with two Arduino nano's ...
-2
votes
1answer
53 views

Power supply for a set of components for IOT smart switches [closed]

I am trying to build my own IOT smart home and as a first step, I used the following components to build a module to control ligts and fans: Atmega 328P - to control the 8 module relays NodeMCU - ...
6
votes
1answer
1k views

Why connect a diode between the reset pin of Arduino and 555 timer?

I am trying to create a watchdog timer using 555 IC and I am following this. I do not understand why a 1N4148 diode is connected between the reset pin of Arduino and the output of the 555 timer. As ...
3
votes
2answers
53 views

Write a condition to execute 2 switch-case functions?

I'm new to programming and using Arduino products, and was wondering if someone wouldn't mind assisting me with a project I'm trying to tackle? If you review my code below, I have 3 conditions within ...
4
votes
3answers
590 views

Can I remove soldered atmega328P from arduino board, using hot air gun, without damaging it?

I need to remove atmega328P from arduino board and the best tool what comes up to my mind is a hot air gun. What is the maximum temperature that atmega328P can withstand?
0
votes
1answer
61 views

Can I use atmega328P without capacitors?

I need to use atmega328P without arduino board, so far I know that I will need 16MHZ Quartz Resonator and two 22nf capacitors. However, I have seen that other people are using atmega328P without ...
0
votes
1answer
43 views

Increasing number of iterations not increasing time

I am using Arduino Uno with Atmel Atmega328. I am using micros() function in Arduino IDE to measure time taken for execution. Here is my code: void setup() { Serial.begin(9600); } void loop() { ...
2
votes
1answer
209 views

ATMEGA AVcc pin - low pass filter

I am a newby to the world of electronics and IC chips, and am looking to make an ATMEGA328 based board to monitor 12v batteries. The board will be powered from the batteries being monitored, with a ...
0
votes
0answers
32 views

Data not sent over bluetooth

I am using a 9-axis accelerator on an Arduino Uno (ATmega328P processor) with a BLE ST shield that can be a replacement for the nRF8001 Nordic chipset that I used in the past. I am able to send and ...