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

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.

0
votes
0answers
23 views

IC enable pin control with Atmega 328p

I want to control the FP6293 ICs enable pin with the Atmega 328p pin PD5 (configured as digital out). The EN pin (active high) on the IC is rated at max 6V with a minimum HIGH voltage of 0.96V. As the ...
0
votes
1answer
48 views

32khz crystal for AVR. Caps needed?

I remember reading long ago that I don't need filter caps for a watch (32768 Hz) crystal. Is this true? Or will I need to put some capacitors to ground on either end of the crystal? I will be using ...
1
vote
1answer
31 views

ATmega328P running on 3.3V using a CH340G as serial to USB interface

I'm trying to use a CH340G chip with an ATmega328P that is running on 3.3V to have a simple serial to USB interface. The available datasheets for this chip seem to be very minimal so I've tried ...
0
votes
3answers
48 views

using the Atmega328P

if I take the micro controller (ATmega328P) from the Arduino board and simply place it on to a breadboard, do I still need to upload the boot loader ?
0
votes
0answers
55 views

Update Mega328 Transistor Tester with Arduino Uno micro controller

I'm trying to update Mega328 Transistor Tester with Arduino Uno micro controller. Here is my Uno and Mega328 connection and Avrdude setting, including particular error: avrdude.exe: verification ...
6
votes
2answers
650 views

LED- Resistor, does the position matter? [duplicate]

I was reading the MAKE AVR programming. One of the chapters suggests to solder resistor to the cathode side of an LED. But in our uni labs it's said to connect the resistor "before" the LED; that is ...
1
vote
1answer
47 views

AVR SPI slave first byte problem

I have written a simple SPI slave on an ATMEGA328PB. It mostly works, however, I can't seem to get the first byte to be what I want. The difference between the first, second, and all other attempts ...
-1
votes
0answers
23 views

Bare ATMEGA328P - Clock using TIMER 1, PWM on TIMER 0 and TIMER 2

I am stuck on an issue. Like the title says, I am trying to generate 2 different PWM signals on TIMER 0 and TIMER 2, while I am using the interrupt on TIMER 1 to count the time. I tried several ...
4
votes
0answers
92 views

Please help with my custom ATMega328 PCB [closed]

I created a PCB for my newest Arduino project and its driving me mad by now. I am through several PCB variations and tried connecting to it (via FTDI first - then) via ISP but I fail every time and in ...
1
vote
3answers
83 views

How to obtain Input voltage from ADC value

I am using atmega328p for my project. I have to read my battery voltage and display it in my cloud. For that, i am using ADC. Now I am getting the ADC value for input voltage applied. But i need to ...
-1
votes
0answers
46 views

ATmega328P ADC strange behavior while reading multiple piezos

I've been working on a drum project involving having one small microcontroller for each drum pad. I'm building it using an Arduino Nano (ATMega328P). I'm currently reading ADC values from 5 piezos. I'...
1
vote
1answer
112 views

Using Atmel Studio 7 to program Arduino Uno

I will like to use AS7 IDE to program the Arduino board, for start Im using Arduino UNO with ATMEGA328P-PU chip. Im using Windows 10 professional First I used the Arduino IDE in order to run/...
0
votes
3answers
78 views

How should I used two MLX90614 sensor on one Arudino Uno given that the sensor has a fixed I2C bus adress? [duplicate]

I have an arduino uno and want to use a non MLX90614. I plan to used more than one sensor on the same Arduino but I don't know how to use two MLX90614 on the same I2C bus.
0
votes
1answer
75 views

Why does this “square wave” have what seems to be a charging action on it's leading edge?

I'm trying to produce a basic square wave output across a resistor from an ATMega328P Xplained mini. VCC is 5 V. Setup: Code: (Stuff with DDC/PORTB is just to control the onboard LED) ...
0
votes
1answer
56 views

LED strip driver using Standalone atmega823 and MOSFETs

I want to make a LED strip driver, using an atmega328 on a custom PCB. I was able to get it to work perfectly using an arduino UNO, with the mosfets connected on a breadboard. However, when I just ...
1
vote
2answers
37 views

SPI between ATmega32 and ATmega328 is not working

I have been trying to accomplish connecting ATmega32 and ATmega328 using SPI Hardware connections: ...
0
votes
0answers
31 views

UART Receiving, and writing conflicts

MCU: Atmega328p Currently i am learning UART communication, and ran in to a problem. look at the code below. ...
1
vote
1answer
54 views

SPI: Receiving bytes from slave

For a couple of days I have been learning about SPI and decided to give it a go with 2 small devices. DEVICE 1: Atmega328p (MASTER) DEVICE 2: MFRC522 (SLAVE) As far as I understand: master sets SS ...
4
votes
3answers
564 views

Is the ATMEGA328P's serial baud rate quantised?

I'm using an ATMEGA328p, running from its internal oscillator (divided by 8 = 1MHz). I've (roughly) measured the oscillator output, using my Salae logic analyser, as ranging from 960KHz to 1000KHz, ...
0
votes
1answer
58 views

Slow clock speed with Atmega328P AVR microcontroller on breadboard

I have a small breadboard with an Atmega328p 28 pin microcontroller with a 16 MHz crystal and two 20 pF capacitors on it (similar to this demo: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard). ...
-1
votes
0answers
41 views

How to improve this circuit to open / close 24V power rail?

I have thought to use the following circuit to control the power of a subcircuit. The control is done through a GPIO pin of a microcontroller (ATMEGA328P). I would like to know if you see any serious ...
1
vote
1answer
53 views

Customzing the Arduino Mini Pro 3.3V/8Mhz. What component can I remove from the original circuit?

I am trying to custom design my own microcontroller circuit and want to eventually embed it into my system. I decided to use an Arduino Mini Pro 3.3V/8Mhz provided from Sparkfun and the links for the ...
2
votes
0answers
206 views

Why did this arduino burn out? SilentStepStick (TMC2130) stepper at 24V

I'm new to electronics. Attempting to bench-test a SilentStepStick stepper driver board, (based on a TMC2130) Using: Arduino Uno, a SilentStepStick driver board, a 0.6A stepper motor, and waterott ...
3
votes
3answers
445 views

is a voltage regulator required for atmega328p when powering from boost converter at a set voltage?

I know that linear voltage regulators are more accurate at holding the required voltage but the boost converter i am using seems to keep a pretty steady one. the voltage will of course be within the ...
-1
votes
1answer
64 views

Are there any reason why i shoudln't run an atmega328p at 16mhz on 4.2v? [duplicate]

I am wondering what problems might occur if i reduced the voltage from the usual 5v down to 4.2v.
-1
votes
2answers
112 views
17
votes
2answers
2k views

Seven-segment display seems to draw little current

I bought a 1.8-inch seven-segment common cathode LED display from AliExpress. So no datasheet available. I used a 1 kΩ resistor and a 5 V source, as to put a max 5 mA in the LED. I measured 1.6&...
0
votes
1answer
72 views

Why there are 7 pins in I/O PORT C of Atmega328P as against 8 pins normally?

In any 8 bit microcontroller, normally there will be 8 bits per I/O port. But in AVR atmega328P, there are only 7 bits in one of the I/O port (PORT C). What might be the reason for the exclusion of ...
0
votes
2answers
68 views

Unexpected current reading when powering LED from ATmega328p IO pin

I would like my LED to run at 40mA (max current for ATmega328p IO pin). The LED datasheet says that 2.2V is max forward voltage. I am trying to calculate which resistor to use. According to the ...
-1
votes
1answer
109 views

How to achieve positional servo control with an Atmega328P?

I am trying to drive my SG90 servo using the timers on the Atmega329P using phase correct PWM. I have set up my motor well enough that it rotates, but I cannot get it to stop - the servo motor just ...
0
votes
1answer
75 views

Schematic Critique - ATMEGA328P & VS1063 [closed]

My knowledge in PCB design is very limited, so I've been trying to learn as much as I can on my own. Some feedback on my first design would be incredibly helpful! Description ATMEGA328P "A" is ...
0
votes
2answers
200 views

Getting Accelerometer values from MPU 6050

I m trying to read accelerometer values from mpu 6050 in atmega328p (Arduino UNO). I want an embedded c program that's why don't wanna use any external lib. So I read about I2C protocol, read the ...
0
votes
2answers
90 views

HC-SR04 Distance Sensor Trigger Signal on 2.5V Voltage level gives no reading

I am using an Arduino on a breadboard setup with an ATMEGA328p MCU. The whole circuit is designed to work in a low-power state and is powered using a 3V (Nominal) voltage Coin Cell. The HC-SR04 is ...
1
vote
1answer
103 views

Is it the right use of the RTC RV8523 to wake up an atmega328p?

I'm using the RV8523 to wake up every 2 minutes an arduino atmega328p. The rtc is wired like this : Where INT1 is wired to Port D pin 3. The internal pull up resistor is activated and yet it's ...
0
votes
0answers
47 views

arduino nano (ATmega168/ATmega328) fuse-bits for avoid reading

I was reading about the fuses to lock the final user of an atmega328/168 of arduino nano for reading the hex code. But I still unsure about this and I dont want to mess up my chip. How can I use ...
0
votes
1answer
136 views

How connect a open collector output to led and to GPIO?

I want to use this Single Cell Li-Ion Solar Battery Charger (BQ24210). The pins /CHG and /PG are an open collector outputs and it will be connected to two low power LEDs as shown in the schematic. If ...
2
votes
1answer
132 views

“light_ws2812” library 10x slower than required (AVR C, ATMega328p int. 8Mhz)

So I'm trying to run some SK6812 (WS2812 clones) on a standalone ATMega328p. The output signal is too slow! I define F_CPU as 8000000 (8Mhz), both in the code and in the Atmel Studio Symbols, but my ...
0
votes
3answers
99 views

Can I power 100 ATMega328 in parallel?

I'm in the napkin-sketch phase of a project that will be ~100 custom devices in a big mesh. Each device is an ATMega328P on a custom PCB with 16-40 'mini' neopixels. I plan to power the whole ...
0
votes
2answers
123 views

Atmega328p - Program works with 2.7V power supply but doesnt with 3.3V

I already posted this question on avrfreaks but so far I'm not getting many responses so decided to ask here as well. So I'll start by telling little bit how this project looks together for the ...
0
votes
1answer
64 views

Voltage Drop on ATMEGA328 when enabling multiple pins

I am doing a hobby project working with a ATMega328, however, I am struggling with a with a small issue when I am trying to drive the output high on multiple pins at once. Somewhat new to this field, ...
1
vote
2answers
425 views

how to choose the right pullup resistances for i2c lines with multiple slaves

In my project I have connected multiple sensor breakout boards to a Arduino-proMIni running at 3.3V and 8Mhz as follows on a fabricated pcb but preserving the original board layouts (so that I can ...
4
votes
6answers
1k views

Timer 1 (16 bit): Why is overflow interrupt sometimes missed?

Initialization of timer 1, the 16 bit timer on the ATmega328: ...
3
votes
2answers
139 views

Direct port manipulation gives random result: Delay necessary?

Setup (Arduino Pro Mini ATmega328p 16MHz, 5V, no pin connected): When called from the setup(), this works: ...
1
vote
2answers
154 views

Powering 5V external sensors from 3V Coin Cell Embedded System

I have a customized circuit using ATMEGA328p with Arduino Boot-loader to develop a Wireless Sensor Network which sends readings from a JSN-SR04 Ultrasonic Sensor to another node via nRF24L01+ wireless ...
2
votes
2answers
327 views

Help connecting custom ATMega328PB using serial FTDI

I built this ATMega328PB circuit. It runs at 3.3v from 1.5v battery using booster and 8MHz from external resonator (CSTCE8M00G52A-R0). Using USBTinyISP I set fuses: Low-FF (for 8MHz), High-D8 (Boot ...
2
votes
1answer
130 views

ATMega328P Programs at 2V but not at 1.8V

I'm perplexed by this one: I'm trying to run my ATMega328P at 1.8V. The voltage at the chip (pin 4 and 21) sits at 1.82V (BK Precision Multimeter). When using the AVRISP mkII, the programmer LED ...
0
votes
1answer
22 views

Does the number of ticks change when prescaling a timer of an Arduino

I am using a 16-bit, 16Mhz ATmega328P microcontroller. I have set the output of the timer to toggle mode. Hence generating a square wave. my question is, do I still get a maximum of (2^16-1) 65535 ...
0
votes
1answer
234 views

LED Cube with no transistors

Regarding this instructable , why is it possible to build this circuit without transistors? We have 4 layers of LEDs like that, which is controlled by an Arduino. Every circle is a LED, the blue ...
0
votes
2answers
534 views

Required crystal frequency for MCP2515 with ATmega328P

I want to connect a number of ATmega328P microcontrollers over a CAN bus. I found out that I will need some MCP2515 and MCP2551 ICs. In different schemas I sometimes see a 8 MHz crystal on the ...
-1
votes
1answer
299 views

Can I use a Broadcom USB Bluetooth dongle with Atmega328P MCU for wireless communication? I can't find the pinout of the USB anywhere [duplicate]

Here is an image of the device I have: However, the chip used in my dongle is BCM2035. It is a standard USB Bluetooth Dongle. I have never used a Bluetooth with an MCU before. I'm guessing the use of ...