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
2answers
71 views

328p-pu drawing too much current in sleep mode

I have a ATmega328p-pu and run it at 8MHz with the internal oscillator. I am executing some code and then send the chip to sleep. I deactivate the brownout and ADC before activating the sleep. I have ...
0
votes
1answer
25 views

Atmega328 ubrr value shifting issue for serial transmission

My doubt is about the way in which the baudrate value is written into UBRRn registers. For eg: Lets say i want to write the value 25 into UBBRn registers to configure the microcontroller to ...
5
votes
5answers
857 views

What's the maximum time an interrupt service routine can take to execute on ATmega328P?

I have an ATmega328P that checks if a button was pressed via pin change interrupts. Now, I want to turn on an LED for 200 ms. Can I just turn the LED on, wait 200 ms and turn it back off in ...
0
votes
1answer
73 views

Will leaving 1 of the 3 GND pins on the ATMEGA328p ungrounded cause any problems?

I am creating a circuit using an ATMEGA328P and i am unable to ground one of the 3 ground pins (other 2 are fine) due to limitations of my design. I have tested the IC with a multimeter and the pin ...
0
votes
2answers
35 views

LM2902 unity gain op amp, miss-wired

I am using LM2902 as a unity gain voltage follower to isolate measurements of a sensors voltage. ( datasheet: http://www.ti.com/lit/ds/symlink/lm2902.pdf ) the sensors i wan to measure operate at ...
0
votes
1answer
43 views

Suggestions on wiring PCA9685 i2c + TB67H303 motor ic

I'm trying to design a circuit in order to use the TB67H303 motor driver with the ATMEGA328p and the i2c protocol by using the PCA9685 controller. I never used the TB67H303 and the PCA9685 chips ...
0
votes
0answers
19 views

AT328 + CP2102(firmware update) + control

we used the AT328 be a microcontroller to control relays. But we want to use CP2102 to update the firmware, before we used the NANO be a bootloader to update the firmware to AT328. Is it possible to ...
1
vote
2answers
54 views

ATMEGA328 Serial input via ISR to buffer - buffer messed on printout

Using an ISR on the atmega328 to read a string ended by a \r from UART and echo back the readout string afterwards ...
0
votes
1answer
85 views

How to lock an ATMega328P from cloning?

I was working with the Arduino IDE. I tried to find out from where a MCU can be locked so that nobody can make a clone from it. I found many answers describing something about lock bit. I realized ...
0
votes
0answers
43 views

TPIC6C595D Q0 pin is always high

Good day everybody! So I have a LED clock circuit, which I designed, powered by an atmega328p xmini, and whatever I do the first pin of the shift register which does the current sinking (TPIC6c595D) ...
0
votes
1answer
37 views

Choosing a capacitor capacitance for a quartz resonator (ATMEGA328P)

I am designing a controller based on an ATMEGA328P-AU chip. For the chip, I provided an external crystal oscillator at a frequency of 16MHz. As a resonator I use YSX321SL His description refers to ...
1
vote
0answers
56 views

ATMega328P control servo motor speed with potentiometer

I'm trying to develop an application in atmel studio 7.0 which will allow me to control the speed of my servo motor with my potentiometer. Now, the problem is that I don't really know how to do that? ...
0
votes
1answer
72 views

(Noob question) Placing parts of a byte in different (parts of) registers

Background: I'm trying to get a gLCD working with an Atmega328p. I got it to work quite easily, but there was one catch: the library that I found, used portB for the datapins. This was unacceptable, ...
0
votes
2answers
42 views

Power Supply for Arduino on breadboard (ATMEGA328PU) from a car battery

I wanna power my Arduino on breadboard (ATMega328PU) from a 12V car battery. simulate this circuit – Schematic created using CircuitLab Is this safe ? What should I add more to make it a ...
-1
votes
1answer
31 views

Issue with timer_func() and delay_func() in generic library for R551 Fingerprint Sensor - ATMega328p

Apologies for the long-winded question. I've recently stepped outside of the Arduino realm for hardware programming. I'm working on a project that interfaces a R551 Fingerprint Sensor with an ...
1
vote
0answers
53 views

Will this LED clock circuit work?

I am making a LED wall clock with an ATmega328P Xplained Mini board, 64 LEDs (4 is for the "main ticks" 15,30,45,60) around the PCB to show the seconds, and a 7 segment 4 digits display to show the ...
0
votes
0answers
30 views

Can I do on-chip debugging on atmega328p with gdb (command line)? [duplicate]

Is there a way of doing on-chip debugging of Arduino Uno (atmega328p) with gdb on the command line? I'm looking for something simplistic and excluding IDE solutions like Eclipse and Atmel Studio. I ...
0
votes
2answers
33 views

Which pins should i use to connect watch crystal for powering Low Frequency Crystal Oscillator in ATmega328p?

If i want use a watch crystal(32KHz) with Low Frequency Crystal Oscillator of ATmega328p,Which pin should i connect the crystal to? Should i connect the crystal to XTAL1,XTAL2 pins of ATmega328p or ...
0
votes
1answer
26 views

Is 128KHz oscillator in ATmega same as Watch Dog Oscillator?

Where is the 128KHz oscillator located in ATmega328p? I am unable to find it on the ATmel data sheet ,Is it same as watch dog timer Oscillator? I am attaching the clock section from the ATmel ...
2
votes
1answer
41 views

Single Arduino I/O pin driving multiple DVR8834 stepper driver boards

I working on a project that uses 6 NEMA 8 stepper motors very similar to This One, each stepper will be driven by a DVR8834 and the STEP/DIR logic supplied by a ATmega328P which has a VCC = 2.7V to 5....
0
votes
0answers
79 views

ATMega328-PU misread ADC values

I am working on an embedded systems project using an Arduino Uno, and I wanted to convert my project over to a breadboard using the ATMega328-PU IC with the bootloader. Initially, this worked ...
0
votes
1answer
81 views

ATMEGA328p-AU BootLoader

I have ATMEGA328P-AU chip, to burn the bootloader I used ARDUINO Uno Board as "ARDUINO as ISP" with setup Board: Nanno. I'm getting the following error. While looking for the solution I got ...
2
votes
2answers
75 views

Buck/Boost converter interaction with MCU in sleep mode?

I am trying to design a battery powered remote controller that has the following components, TPS63802 (converter), AP9211 (battery charger/protection), Atmega328 (MCU), NRF24 (transceiver). The ...
2
votes
2answers
88 views

Read voltage of the battery that feeds ATmega328p

I am designing a system focused on the uC ATmega328p and I am feeding it directly with a 3.7V LiPo battery. I also have a 3.3V LDO feeding several sensors in the system. My question is the next, If I ...
1
vote
1answer
83 views

Selecting true crystal settings for 328P [7.3728 MHz]

I want to make a new board working with 115200 (gsm modem) UART. so I want minimum baud error rate. I look at https://cache.amobbs.com/bbs_upload782111/files_22/ourdev_508497.html table and decide ...
2
votes
1answer
179 views

CAN Bus sniffing

I am CE major prototyping embedded hardware to read and send data via the CAN bus. The design is coupled with a GSM/GPS module to enable tracking. I needed an EE perspective on the schematic diagram (...
0
votes
0answers
39 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
63 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 ...
2
votes
1answer
94 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
58 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
146 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
687 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
128 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 ...
4
votes
0answers
148 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
142 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 ...
3
votes
1answer
521 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
201 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
83 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
2answers
155 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
74 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
130 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
635 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
161 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
vote
3answers
91 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
369 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
519 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
131 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
84 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 ...