Questions tagged [atmega328p]

This tag should only be used with questions about the ATmega328p microcontroller. Questions about other ATmega series MCUs should use the tag "atmega", and those about the use of the ATmega328p within the Arduino UNO should use the tag "arduino". It is acceptable to use this tag with specific variants, like the ATmega328, ATmega328P-PU, etc.

Filter by
Sorted by
Tagged with
1
vote
1answer
347 views

Connecting AVR running at 3.3V to a 2.8V I2C bus

I want to connect an AVR (ATmega48PA) to an I2C bus whose pullups are connected to 2.8V which is the operating voltage for other devices on the bus. The AVR is running at 3.3V. Since SDA and SCL pins ...
0
votes
1answer
182 views
0
votes
2answers
1k views

Can't write lock bits on ATMega328p-pu

I'm trying to set the lock bits on my ATMega328p-pu, using an Arduino UNO as an ISP. this is what happens: ...
1
vote
2answers
870 views

AVRISP mkII can't connect with target when using an AVR on a breadboard

I'm having a problem with my AVRISP mkII. I'm trying to program a ATMEGA328P on a breadboard using AtmelStudio 7. The problem is I can not make AVRISP detect the target. Whenever I try to program the ...
1
vote
4answers
364 views

Errors transmitting 10 bit number read with Atmega328 via serial and reading it with “od”

I have ATMEGA328P-PU and I have hooked up the photocell to it. I'm using the following code to read the analog values and send them back to computer for debugging. ...
1
vote
1answer
7k views

Setting a simple PWM on atmega328 at certain frequency

I'm having a hard time to set a 16 bit PWM on atmega328 that works with frequency of 50Hz and have a duty cycle that can be varied. I also have my doubts that if I can have an ADC working together ...
1
vote
1answer
135 views

Faulty display behavior using a Atmega328 due to (wrong?) logic voltage level

I have built a little circuit using a Atmega328P to drive a DD-32645C-2A display using a connector board. The display uses a SSD1303 driver. So here is my circuit: Pretty straight forward, I think. ...
0
votes
2answers
553 views

Modifiying variable inside of Interrupt vector. AVR

My question is again about modifying variables inside the ISR. If the variable used only inside of ISR, I don't have to declare it as volatile, right? After some researching, I figured out that ...
0
votes
2answers
544 views

Mosfet not passing enough current using a microcontroller and 2 power supply

I have made this circuit: Ignore "high voltage circuit" is not used. It's a prototype built in a breadboard with jumpers, and i have a problem with the mosfet "IRL540N", is not passing the optimal ...
0
votes
1answer
908 views

Atmega328p: why button input is read as 0 when pressed?

I'd like to turn on the board's LED (PB5) when I press its button (PB7). ...
1
vote
4answers
3k views

Is power cycle reset different from reset pin reset?

I am using custom built arduino uno for a home automation project. Sometimes, the arduino locks up due to electrical noise or sparks in the ac lines. More details here. I tried conducting some ...
0
votes
2answers
169 views

atmega328p GPIO with 3.3V regulator reads 2.5V at pin when High

I am driving the enable on a boost regulator and the boost is not turning on. When I checked the voltage on the enable, it was 2.5V. The boost worked on an identical set of boards I tried before this (...
-1
votes
2answers
5k views

Controlling brushless gimbal motor (BGM2804)

I'm using a standard board for control this type of motor (SimpleBGC), this board uses an atmeg328p e some brushless drivers. I'm writing a simple code for turn left/right with some velocity, but i'm ...
0
votes
1answer
106 views

Battery voltage drops when connected to PCB

I have a circuit containing an atmega328p microcontroller with hc-05 bluetooth module. microcontroller is powered via 7805 regulator. When 7805 is supplied the source voltage by a 9V battery, the ...
5
votes
1answer
9k views

Atmega328P - How is brown-out-detection supposed to work?

[SOLVED][UPDATE]: The problem was with fuse bits. Somehow the fuses were being incorrectly written as 0xFE rather than 0xFD. FE corresponds to 1.8V and thus arduino board was working down to 1.8V. I ...
2
votes
1answer
78 views

Power Consumption and efficiency

I know that similar threads had been answered but due to the fact that i am a beginner at electronics i would like to verify my measurements concerning about voltage total current and power ...
0
votes
2answers
3k views

AC dimmer- triggering triac using moc3041. lamp always remain on, and does not change its intensity

Below is schematic. 1) Problem is lamp always remains on,even if i haven't provided the Anode A terminal with power through micro controller. 2) Also please explain me the need for R7 resistor. 3) ...
0
votes
1answer
1k views

Setting baud rate for Atmega328p with setbaud.h

I'm working with an Atmega328p, running off the internal 8MHz oscillator, divided by 8 to produce a 1MHz clock. I set the fuses according to the calculator here. Confirming this with avrdude: ...
-2
votes
1answer
100 views

AtMega328p A/D inaccuracy

I'm getting A/D readings from an AtMega328p chip that are about 10% higher than I can read on the input signal with a meter. I'm measuring room temperature with an LM34CZ Fahrenheit temperature ...
-1
votes
1answer
55 views

Atmega328 not sending data to screen

hello I have an atmega328p with code on it to display graphics on a screen. It works when I upload it to an Arduino uno but when I upload it to an atmega328p that is powered by the Arduino it does not ...
0
votes
3answers
1k views

Atmega328p output voltage

I just programmed my Atmega328p with an Arduino as ISP. I am making a permanent circuit on a piece of perf-board. I need to connect the Nokia 5110s Vcc pin to 3.3V on the Atmega328p. Which pin is 3.3V ...
1
vote
1answer
1k views

ATMEGA328P send MIDI via USB

I've created a circuit on my breadboard including multiple shift registers and a teensy 2.0++. My program takes inputs from the shift regs and converts them into MIDI messages. Using my teensy in ...
1
vote
2answers
607 views

Atmega Standalone, Running without crystal oscillator

I plan to run the atmega328p without external oscillator like in this tutorial: http://www.instructables.com/id/Atmega-Standalone-Running-without-crystal-oscillat/?ALLSTEPS Some guy here saying: "...
0
votes
2answers
1k views

Serial communucation rasperberry pi and atmega328p

I have a design system which is generate data. My system include lidar sensor and atmega328p. Atmega is driving my sensor and generate data. No problem is here. But my aim is data processing in matlab ...
0
votes
2answers
251 views

Atmega was loose during programming, now target doesn't answer, and device signature keeps changing

I'am using an atmega328p with a custom build programming board connected to an usbasp. While programming with arvdude, the atmega chip was not perfectly placed in the board header, and the atmega ...
1
vote
2answers
1k views

Cannot enter programming mode ATMega328p

I'm using an ATMega328p Xplained Mini development board. I was able to program it using Atmel Studio 7, being new to AVR programming I accidentally set the RSTDISBL fuse to 0 (has a default value of 1)...
0
votes
1answer
370 views

Using 3.3v for ICSP programmer

I have a circuit that is connected to a VCC of 3.3v because there is a component connect that only runs on 3.3v. Also a Atmega328p is connected to this VCC and now I am trying to add an ICSP. But all ...
2
votes
1answer
215 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 ...
1
vote
1answer
376 views

Digital potentiometer as INA129 gain

I'm working on a waveform generator for which I'm using the DDS AD9833 chip to generate sine signals and triangular signals. I'm trying to amplify these waves since the AD9833 output is 600mVpp and I ...
2
votes
1answer
475 views

Discrete Fourier transformation or FFT?

I currently have a setup,AUDIO-> LM386 -> MSGEQ7 ->ATMEGA328p (16mhz) and it works to light up an 8x8 LED matrix. 16mhz crystal. each column lights up to represent a frequency: average, 63Hz, 160Hz, ...
-2
votes
1answer
571 views

AVR - ATMEGA328p ADC keeps returning 1023

We have developed an Atmega328p based Kit. We want to read some analog sensor values in the application. But analog readings always returns 1023. Even If we connect GND pin with analog pin, it gives ...
2
votes
1answer
3k views

AREF on atmega328 if analog is not used

I have setup a hackduino following this instructables http://m.instructables.com/id/Perfboard-Hackduino-Arduino-compatible-circuit/step6 This connects AREF to 5V directly. My understanding now is ...
3
votes
2answers
789 views

Is it compulsory to use ext oscillator in designing arduino circuit?

I am designing a circuit for arduino. I will be using Atmega328p, and will connect few male header for pin access and 6 male headers for programming (MOSI,MISO,SCK,...
1
vote
1answer
1k views

LiPo charger with LDO regulator

I have ATmega328P circuit that drains from 0.1 to max 150 mA. Most of the time it's asleep (0.1 mA - with other little components attached) and once a minute it wakes up and drains 80 mA && ...
0
votes
1answer
1k views

8 bit SPI Microcontorller interface with 16 bit SPI slave

I'm willing to use the Atmega328 microcontroller to control the AD9833 waveform generator through the SPI interface of the microcontroller; the only problem is that the AD9833 reads 16-bit data while ...