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.
509 questions
1
vote
1
answer
4k
views
Measure different Vcc using 1.1V bandgap
When I power my ATmega328P chip from 5.16V and 3.3V, there doesn't seem to be a single bandgap voltage compensation figure that works for both.
I'm using the following sketch, and I need the ...
2
votes
0
answers
45
views
Atmega328 xbee and softaware serial libraries
I use an atmega328 with fdti cable wired at rx/tx and i want to connect a zigbee s2 at diferrent pins. I have tried to use SoftwareSerial library but i would like to use the xbee library too. Is ...
6
votes
4
answers
7k
views
Confusion with ATmega328P and 3.3V/8MHz
Firstly, I have tried to set the bootloader to be 8MHz internal oscillator.
I have tried the board setup from here - https://github.com/oshlab/Breadboard-Arduino.
And also the breadboard-1-6-x.zip ...
0
votes
1
answer
5k
views
How to load Atmega328p 8mhz board using board manager
I need to load the Atmega328p 8kHz board definition using the board manager and can not find a way. Any help will be appreciated.
2
votes
2
answers
2k
views
Did I Brick my Controllino?
I recently obtained a Controllino Mini to be used in a small industrial project. While checking it out I also wanted to test the built-in RTC capabilities. In doing so I toyed around with the ...
3
votes
2
answers
274
views
Barebones 328p, 2xAA vs 3xAA, which will last longer?
So im just running a 328p at 8mhz with the internal oscillator. Datasheet says 1.8 to 5.5v is voltage range.
Will 3xAA in series (~4.5v) last longer than 2xAA in series (~3v), assuming all batteries ...
0
votes
1
answer
662
views
Burn normal bootloader onto Atmega328P configured to use internal 8MHz clock
I have an Atmega328P that I have previously burned with a bootloader configured to use the 8MHz internal clock as described here. I would like to now burn the normal Duemilanove bootloader configured ...
0
votes
1
answer
667
views
Understanding the contents of a library in C
So this is a question not just about the #include but most all includes you find while programming in C.
So I understand a library is prewritten code and when you include that library are you able ...
1
vote
1
answer
69
views
Custom built Arduino is not working - double blinks
I've made a home-made Arduino based on this video. The problem is that I can't upload anything, it doesn't react, only the LED double blinks in every second. What does that mean? How to fix it? Thanks....
2
votes
2
answers
7k
views
Is RX1 and TX0 the same thing as TX and RX? Will there be a difference in the way I program it?
I have an Arduino.
I'm not sure if RX1 and TX0 the same thing as TX and RX? Will there be a difference in the way I program it?
For example, do I treat RX1 and TX0 as RX and TX in the Arduino IDE ...
1
vote
1
answer
4k
views
Does the VCC Output pin always give out a consistent 5V Voltage supply? What is the current output?
Does the VCC Output pin always give out a consistent 5V Voltage supply? What is the current output?
This is the Chip I have. On the chip it says ProMini R160JAC6v. and When i program it. It programs ...
2
votes
2
answers
1k
views
ATMega328P-PU not working
I bought some material on the net to start working with Arduino. I didn't want to buy an Arduino, since it costs a bit too much IMHO, so I bought an ATMega328P-PU, and made an Arduino on a breadboard. ...
0
votes
1
answer
784
views
Timer/Counter programming Arduino
I'm trying to blink an LED on an ATMega328P (same MCU as Arduino I think..) using the internal timer but I'm stuck since it doesn't seem to light the LED at all....
#include <avr/io.h>
//#...
1
vote
2
answers
1k
views
Atmel AVR languages
Hello I recently purchased some atmel AVR chips. You can programme them in Arduino. I was wondering if it is possible to programme them in any other language except for C or Arduino. Also can you use ...
0
votes
1
answer
305
views
Arduino on breadboard Tension is 4.4V instead of 5 V,looking for some guidance
I build a circuit that work on breadboard now i try to prototype it,so i start solder it on a prototype board and the arduino is out of sync.So i check the tension and for some reason it's 4.4~4.6 on ...
0
votes
1
answer
342
views
Switching LED on and off using microcontroller
I am new to microcontrollers and just become confused trying to solve the following problem:
An ATmega32 chip is connected to four on/off switches (SW0-SW3) and 4 LEDs (LED0-LED3). SWi is connected ...
0
votes
1
answer
414
views
Atmega328 PWM frequency setting not working
I have an Arduino UNO with Atmega 328 SMD, and I am trying to use PWM, but by setting registers, not using analogWrite(). My code is:
DDRD |= (1 << PORTD6); //Setting pin D6 as output
OCR0A = ...
0
votes
2
answers
1k
views
Simple network protocol to communicate between N slave arduino and 1 central arduino? [closed]
i am looking to communicate text ( 40 char for each message ) between N arduino and a central one ( Communication is one way slaves to Master).I am looking for wire communication with 1 to 5 m ...
0
votes
5
answers
1k
views
How would I use Arduino microcontroller separately?
I'm learning Arduino. I use Arduino Uno board with ATMEGA328-PU. I tried basic codes like LED blink, control of DC motor etc. Arduino board is used only when we program microcontroller, right? I mean, ...
2
votes
1
answer
3k
views
Arduino Uno ADC behavior in free running mode
I'm using my ATmega328P to sample an analog signal in free running mode. The ADC clock frequency is set to ÷128. I've read that a single analog conversion lasts 13 clock cycles. I would like to know ...
2
votes
0
answers
46
views
Lightblue Bean BTLE tinkering
How does one modify the Bluetooth settings, like services or pincode, on a light blue bean?
Ps I'm on Android
http://legacy.punchthrough.com/bean/ if you don't know what I'm talking about
4
votes
1
answer
247
views
Arduino IDE Based Data Logger - Stops Running
I have created a data logger that writes to a MicroSD on a user defined interval. The data logger also has the ability to use an xBee unit to transmit the data received to a base station.
This is ...
1
vote
2
answers
242
views
From Arduino to a miniaturized circuit
I have a project made with Arduino, and I want to replace it by a miniaturized circuit with just a microcontroller. Is there any tutorial that can guide me in doing this? Any reference is wellcome. ...
2
votes
2
answers
368
views
Taking off the chip from Arduino
I just uploaded a sketch of a song to my Arduino and it works well. Could I just take the chip out and hook up speakers to it and a power source to play the song? and just get another chip and put it ...
5
votes
2
answers
184
views
Trouble with Timer 0
I'm taking my first wobbly steps outside the Arduino IDE and I'm not having much success with timers / interrupts. I can set a pin to output and light an LED with registers fine but I cannot for the ...
0
votes
1
answer
19k
views
How to flash the "atmega328" with AVRDUDE?
I have an external device using an ATmega328, not a ATmega328-P as used by the Arduino Uno.
Now I want to use AVRDUDE and an Arduino Uno to flash a hex file on this chip. Therefore I removed the ...
1
vote
1
answer
191
views
is it possible to convert a 328 design to use a 32U4?
I have several projects that use simple 328 based arduinos that I built myself, similar to the familiar "arduino on a breadboard" projects that I'm sure everybody has seen. They have just the bare ...
0
votes
1
answer
1k
views
Algorithm to detect motion using ultrasonic sensor
I have a PIR sensor which sometimes give false readings and I have added a ultrasonic sensor to compensate for that. I think my algorithm can work, however currently it is very prone to give false ...
0
votes
3
answers
296
views
Why atmega168/328p starts to reset?
First we set fuse bits:
avrdude -c usbasp -p atmega328p -U lfuse:w:0xFF:m -U hfuse:w:0xDF:m -U efuse:w:0x07:m # same for atmega168
In the following examples we use the following commands to compile ...
5
votes
1
answer
450
views
Why were Atmel MCUs used for Arduino?
Atmel microcontrollers are not cheap compared to STM and Microchip. Why did Arduino select Atmel MCUs such as atmega328 and atmega2560 on their board out of so many alternatives?
0
votes
1
answer
2k
views
Why serial communication does not work on atmega168/328p?
I expect from the following program serial.c to light the led on if I send key 1 from terminal, and light the led off when I send key 0 from terminal:
#define F_CPU 16000000UL
#define BAUD 9600
#...
0
votes
1
answer
243
views
atmega328 raspberry pi 2 communication
I have an atmega328p (running on it's internal 8mhz clock) receiving data over rf. I need the data received to be communicated to the raspberry pi 2 using its gpio pins, I cannot use USB. I don't have ...
16
votes
4
answers
77k
views
Program an ATMega328P and use it without Arduino board
I'd like to use an ATMega328P for my project, I hope to do it without the Arduino board.
I know with the Arduino IDE and an Arduino board I can program the microcontroller. However, would it be ...
1
vote
1
answer
861
views
ATMega328 + Bluefruit LE stops working soon after power on (not consistently)
Now I am Running Arduino code for Bluefruit LE on bare ATMega328 with 8MHz internal clock, with Bluefruit connected, pin 0 and 1 RX/TX unused, and AT42QT1011-based capsense circuits (logical input to ...
0
votes
1
answer
293
views
Running Arduino code for Bluefruit LE on bare ATMega328
I need to hook up Bluefruit LE Breakout (nRF8001-based) to ATMega328 chip (to use it as wireless UART), and it seems like the library provided is for Arduino.
What I have is just bare ATMega328 (note ...
1
vote
2
answers
204
views
Standalone Arduino
I have an Arduino Uno and I am using arduino 1.0.5 IDE. I followed he procedures for bootloading an atmega328P-PU on a breadboard using an Arduino Uno from the link:
https://www.arduino.cc/en/...
2
votes
1
answer
1k
views
Atmega168 Watchdog timer
I'm trying to use the watchdog timer to prevent the atmel from being stuck in a loop.
Right now, I have the watchdog timer in System Reset Mode, with a 8sec timer. I reset the timer in every loop ...
2
votes
0
answers
350
views
Can't program bareduino. "avrdude: stk500_recv(): programmer is not responding"
I've built a bareduino. The blink sketch that it came preprogrammed with worked. I was also able to program the ATmega328 by putting it into a arduino uno.
What I can't do is upload a sketch directly....
1
vote
1
answer
289
views
Uploading to atmega328 over serial with arduino bootloader running at 2MHz
I want to run an atmega328 on a breadboard at 2MHz and upload to it via the serial pins (pins 2 and 3). So I am setting the clock divide by 8 fuse bit to enable this, meaning the atmega runs at 2MHz ...
1
vote
1
answer
2k
views
Cannot upload sketch to Atmega328p TQFP soldered on PCB
After creating a working prototype with DIP ATMega328 chip/ Arduino UNO I recently got PCBs assembled with SMD components and ATMega328P TQFP soldered onto them, but now I'm having a hard time trying ...
0
votes
1
answer
264
views
How to do a software reset on MAX7456?
I messed around with the MAX7456 chip for a while, even the character set updating sketch seemed to work after a few modifications. But now it is not displaying anything with the Hello World sketch ...
1
vote
3
answers
6k
views
Arduino as ISP with serial monitor for ATmega328
I have an ATmeg328 TQFP on a board (in system). I use an Arduino Uno as an ISP to programm the chip. However, i would like to use Serial Communication with the chip through the Arduino board.
Is this ...
1
vote
1
answer
346
views
Atmega328 board output voltage
I'm thinking about making my own "arduino" low power board but I have a question about the atmega328. Is the output voltage on the pins always 5v or it depends on the input voltage I gave to the ...
1
vote
1
answer
3k
views
Timer 2 interrupt with ATmega328p and make measurement in ISR
I am working in my project and i want to use Timer2 interrupt every 100ms to get new measurement from the output of my 5 sensors which connected to pins A1,A2,A3,A4,A5.
I read in some article that ...
2
votes
0
answers
551
views
SIM 900 stop after 1'5 hours; what's wrong?
I have a Gboard module (from Itead) configured to recieve data from Xbee sensors, and log data to a server DB on inet (via GPRS). This module is programmed with Arduino IDE.
I turn on the module (...
0
votes
1
answer
307
views
Updating a sketch to work with IDE 1.6.6
I've got a MAX7456 chip and I am using this (this is the unmodified one) library with it.
There's a sketch inside the examples folder (Max7456WriteTable) that I need to get to work to update the ...
0
votes
1
answer
688
views
How to update the character table of MAX7456
I've got a MAX7456 chip and I am using this library with it.
But the issue is that the character table is not the one the library needs to function like it should. The "Hello world" example is ...
4
votes
2
answers
191
views
Usefulness of measuring 0v using ADC
I'm looking at the datasheet of the ATMega328, and I see the different channels you can select for AD conversion. ADC0..7, ADC8 (temperature), 1.1V (VBG), and lastly 0V (GND).
What would be the use of ...
105
votes
3
answers
117k
views
Have I bricked my Arduino Uno? Problems with uploading to board
I can't upload sketches to my Arduino Uno.
Have I "bricked" it?
What steps can I take to work out what is wrong?
What can I do to fix it?
13
votes
2
answers
15k
views
Put ATmega328 in very deep sleep and listen to serial?
I have investigated the sleeps options of the ATmega328, and read a few articles about it, and I would like to understand if there are more options.
So I would like to get as low current as possible, ...