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
0
votes
2answers
183 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
90 views

SPI between ATmega32 and ATmega328 is not working

I have been trying to accomplish connecting ATmega32 and ATmega328 using SPI Hardware connections: ...
1
vote
1answer
161 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
692 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
224 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). ...
0
votes
3answers
96 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
478 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
572 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
65 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
143 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
97 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
74 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
238 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
109 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
452 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
158 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
156 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
1answer
255 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
241 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
107 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
167 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
84 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
599 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
2k 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
169 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
265 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
766 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
273 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
24 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
333 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
1k 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
445 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 ...
0
votes
1answer
107 views

ATMEGA328p only outputs 1.15V

I build a standalone board for my ATMEGA328P-U chip according to this tutorial (which should be the same as this). My schematic should look like this On my real perfboard I have 2 GND lines and 2 5V ...
3
votes
1answer
228 views

External crystal needed for ATmega328P for multi-master I2C communication?

I want to connect multiple ATmega328P chips to an I2C bus. Each unit is configured as slave but can send/broadcast messages as master too. I have this currently working with Arduino Nano units and ...
5
votes
1answer
681 views

Why doesn't my VGA implementation using an AVR microcontroller work?

Problem I'm trying to generate the appropriate signal output for interfacing an AVR ATmega328P microcontroller with an LCD monitor, via the VGA specification. The VGA specification I am trying to ...
0
votes
1answer
38 views

use atmega328p-pu to flash atmel 90usb162

I have an ATMEGA328p-pu from an Arduino that was going to be used in a company product. We switched to a PCB that uses ATMELs 90USB162. I would like to make a circuit board that uses the ATMEGA to ...
3
votes
3answers
742 views

Servo interfering with 433MHz RF

I'm using an Atmega328P running at 16Mhz (similar to an Arduino UNO). to control a 433Mhz Superheterodyne RF receiver (WL101-541) and two TowerPro SG90 analog servos. Everything is working except for ...
1
vote
1answer
2k views

Controlling Servo motor with ATmega328p microcontroller

For a while, I've been working with Arduino, but about a month ago, I switched over to using solely the ATmega328-PU microcontroller. I use the Atmel Studio IDE. So far, I have successfully blinked an ...
1
vote
0answers
264 views

Problem with ATmega328P when used with DRV8302 gate driver

I am developing a motor controller for a 48V BLDC motor. For this, I am using the ATmega328P microcontroller in combination with the DRV8302 gate driver from Texas Instruments. It uses a simple ...
1
vote
1answer
170 views

Arduino Nano ISP turns into the target program (as well as target MCU)

I'm trying to use a Nano V3 clone as an ISP to program atmega328p's because I have not dedicated programmer yet. As part of troubleshooting I'm just trying to program another breakout board with ISP ...
0
votes
4answers
2k views

How to lock ATMEGA328p-au to disable sketch read

How to lock ATMEGA328p-au to disable sketch read from Arduino IDE? Is there a hardware way too? What are the chances it can go wrong? What will happen if it goes wrong? Notice: I am a computer ...
0
votes
1answer
352 views

Problems with LCD when using it with ATmega328P

I'm trying to use a 16x2 LCD screen to be programmed by the ATmega328P microcontroller using Atmel Studio v7. I am using a library for this purpose that I found on the internet. I wrote this program ...
0
votes
1answer
383 views

Can not flash atmega328p with usbasp

My usbasp was working fine.I could burn programme to atmega328p.But last night i wanted to cahnge the clockspeed by clock_prescale_set ( clock_div_t x ). after that it burned successfully and ...
1
vote
1answer
251 views

Atmega328P - PU Not Working Properly (Instability, goes to sleep mode after some usage)

I have successfully designed & tested a circuit using arduino uno for controlling a dc motor (MAX 50A,12V,SHORT-DUTY) By using a relay module and current sensor (configuration given in schematic). ...
0
votes
0answers
203 views

Problems with ICP Atmega328p

I am trying to use ICP (Input Capture Pin) functionality of ATMEGA328p (Arduino Uno board) and somehow it does not seem to work. I have connected a switch to ICP pin PB0 in this case, and want to ...
0
votes
1answer
67 views

Does two different regulators act as different power supplies for MCU and Relays [duplicate]

I'm driving 4 coil relays with an MCU through BJTs. As I activate one by one, sometimes the third won't even turn on, and if it does, it nor anyone will turn off, as if the MCU freezed. I'm totally ...
0
votes
1answer
426 views

AC current measurement with ATmega328

I am trying to reconstruct and measure AC current with a current transformer (ratio 1:2500) and an MCU (ATmega328p) like shown in this schematic, so the input voltage will be between 5V and 0V with ...
1
vote
1answer
317 views

Arduino/Atmega328: check if PIN is shorted to GND

In a project with an Atmega328 running at 8 MHz and powered from 3.3 V, I need to check if a 2-pin jumper is permanently inserted. So, the schematic is: and the board is: I cannot figure it... Is ...
0
votes
1answer
1k views

How to set two timers running at the same time in atmega328p?

I want to set up two timers running two ISR-s with different resolutions. One timer for counting milliseconds for clock time, another for counting microseconds when ...