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 votes
0 answers
53 views

How can we use TCP for sending realtime data sampled at 10kHz? [closed]

My system samples vibration data at 10kHz frequency. These realtime samples are sent to the server using an ESP8266 with UDP communication. An ATmega328P is interfaced with the ESP8266. Sampled data ...
user avatar
  • 13
1 vote
0 answers
120 views

Problem with Arduino exercise

I have to do the following exercise: An 8-bit binary number is input to Port D of the ATMEGA328. Show on two 7-segment displays the independent value of bits 4,3,2,1 on the display. Note: Set keys ...
user avatar
1 vote
2 answers
70 views

Can I improve EEPROM lifetime by not changing individual bits?

In my current project I need to store (among other things) the current elapsed time in hours to retrieve it in case of power loss. Since I am using a Arduino Nano I would ideally like to use the built ...
user avatar
1 vote
4 answers
115 views

Multiplexing with a limited number of pins

I want to create a 10x20/20x10 grid of LEDs by multiplexing. I will probably use an Atmega328p chip for my project, and I obviously don't see 30+ digital pins. Will any of these methods work to ...
user avatar
1 vote
1 answer
40 views

When does a USART 'buffer ready' bit turn on?

I have an Atmel328P mini Xplained. The datasheet specifies UCSR0A (1 << UDRE0) as a 'buffer ready' signal. This reads 1 if the receive or transmit buffer is ...
user avatar
-4 votes
1 answer
58 views

Atmega328p I2c to SPI [closed]

I have atmega328p and I need resend data from more sensors I2C to another atmega328p via SPI. Do you have some example? I am only beginer.
user avatar
0 votes
1 answer
108 views

How to remove low-level audio noise from an ATMEGA328p + LM386 circuit

I'm building an audio project with an ATMEGA328p using an LM386 as the amplifier and the Mozzi audio library. Power source is 4 AA batteries. I'm using an MCP1700 voltage regulator to drop the ...
user avatar
1 vote
1 answer
62 views

Why am I having communication issues between ESP12F and ATmega328?

I am working on a PCB to enable an ATmega328 to connect to an MQTT network through an ESP12F. I am using a voltage divider in the TX line from the ATmega to reduce it to 3.3v (using nets SR+ and SR- ...
user avatar
1 vote
0 answers
60 views

Running a 12V motor on 9V battery and arduino and matlab implementation

I have a DC geared motor rated at 12V and 60 rpm . It has a quadrature encoder with 700 PPR. I connected it directly to a 9V battery (almost new) and wished to measure the rpm of that motor. To find ...
user avatar
3 votes
2 answers
139 views

Controlling High Current LEDs with an ATmega328

I am trying to build a circuit design that has 4 LEDs that will need more current than the ATmega328 can give out. I will want the LEDs in parallel so I can control them all individually. Because they ...
user avatar
  • 31
0 votes
1 answer
71 views

Powering Arduino from Li-ion Battery

I am trying to make a emergency button with Arduino Nano. it should work with and without input voltage. So that I made this circuit. if there is a input voltage 5 volt NANO should directly suppling ...
user avatar
  • 873
0 votes
0 answers
45 views

Wrong value on the X axis of an LSM303 accelerometer

I am currently developing a library for the LSM303 and I have an issue reading the X axis, I have the right values on the other two axes (Y, Z), I'm using I²C bus on an Atmega328P. My reading: X: 39....
user avatar
0 votes
1 answer
41 views

Unable to read anything but version information from MMA9555L

I'm currently working on a project that uses a MMA9555L from NXP. I'm trying to acces the chip via I2C but the only thing I can access is the version information. This gives me the impression that the ...
user avatar
0 votes
0 answers
79 views

Cannot set up WS2812B LEDs with bit banging and ATmega328P at 16MHz

I have an ATmega328P (16MHz extern, GBoard with SIM900 module). I bought 10 LEDs with WS2812B module. My ATmega works with 3.3V but for LEDs I need 5V so I decided to connect TXB0104. I connected ...
user avatar
1 vote
1 answer
66 views

Where did I go wrong with picking my baud rates?

So I have an xbee (API mode, series 2) communicating with either a naked 328p on a breadboad (8 MHz external oscilator) or an adafruit pro trinket (328p based, 12 MHz external oscilator). Though never ...
user avatar
0 votes
1 answer
42 views

GBoard SIM900 and Usbasp - power supply issue

I bought Gboard module with Atmega328P inside: https://wiki.iteadstudio.com/Gboard I don't want to use Arduino at all. I just want to upload my own code into Atmega328P and make a phone calls without ...
user avatar
0 votes
0 answers
907 views

How to receive UART0 data using UART0 Received interrupt in ESP32 with Arduino IDE code

I want to receive UART0 data of ESP32 using UART0 Received Interrupt using Arduino IDE. There have arduino Library to receive UART data like: ...
user avatar
0 votes
0 answers
52 views

Would it be possible to replace the atmega328p on the Arduino Nano with an atmega324p?

I have an atmega324p and was wondering if I could attach it to my Arduino nano by removing its atmega328p. If I cannot due to pin layout, would it be possible to make my own PCB of an Arduino nano ...
user avatar
  • 1
0 votes
1 answer
63 views

ATMEGA328P RX/TX lines need to be connected for properly function with Arduino code?

I'm using ATMEGA328P implement on a miniPCB to control the Raspberry Pi Start and control LED Status. The code works fine when ATMEGA328P is plugged on Arduino UNO board, but on the PCB, on the first ...
user avatar
  • 330
2 votes
1 answer
72 views

Strange behavior when splitting an AVR program across functions

I'm trying to run a very basic "blinker" program on an Atmega328P. Here it is in its entirety: ...
user avatar
  • 147
0 votes
1 answer
73 views

Something wrong on my board. ATMEGA328P. Soldering points wrong?

I'm using ATMEGA328P soldered on a protoboard. ATMEGA328P have some outputs that are connected to a RGB LED. The code take as inputs RGB led state from Raspberry and pass these inputs as outputs on ...
user avatar
  • 330
0 votes
1 answer
72 views

Correct Wiring for Adafruit 2.2" TFT display w/ sd card

Apologies for a potentially frowned upon question, but Adafruit's documentation for the 2.2" TFT display with sd card breakout is a little lacking. Essentially, they describe the display and sd ...
user avatar
0 votes
1 answer
160 views

Programming the Feather 328p/ ATMega 328p

I have an Adafruit Feather 328P, which claims to be 'Arduino Compatible'. I believe I have set up my Arduino IDE correctly (according to the Adafruit link), but whenever I try to upload to the board I ...
user avatar
1 vote
1 answer
41 views

Capacitor value on supply grid

I am using ATmega328p TQFP for application described in schematic. simulate this circuit – Schematic created using CircuitLab So there is plenty of load on output side (up to 500mA). I have ...
user avatar
  • 377
0 votes
0 answers
49 views

What is this element with triangle shapes from the ATmega datasheet? [duplicate]

I am trying to understanding the schematics of the I/O of ATmega microcontrollers. But I can't identify the red marked element. I just want to know its name and its functionality in the circuit. The ...
user avatar
  • 1
0 votes
1 answer
49 views

MCU could not turn on transistor

I am using atmega328p and PNP transistor FMMT720. Goal is simple to switch on and off transistor with GPIO. For specification part: Datasheet says continuous collector current is 1.5 A and my ...
user avatar
  • 377
0 votes
0 answers
71 views

Crystal oscillator voltage rating (as external oscillator for atmega328)

I can't find this question being asked anywhere. All the tutorials I watched and read explain how to setup an external oscillator for atmega328, and related fuse settings. Is the voltage rating of ...
user avatar
1 vote
1 answer
46 views

Step-down Lipo voltage to 1.9v

I'm trying to power a MMA9995l, NRF24l01, HDC2080 and ATMEGA328P from a Lipo battery. The perfect voltage for this is 1.9V. Since I'm quite new to component sourcing and step-down converters in ...
user avatar
2 votes
1 answer
64 views

Unusually long programming times with ATmega328p

I'm programming an ATmega328p using avrdude, and with a program size of 3074B, I am experiencing approximately 13 seconds of programming time. This is painfully slow when developing with the ...
user avatar
  • 235
0 votes
2 answers
106 views

FT232RL keeps resetting

I have a small board with an atmega328p and an FT232Rl. The atmega seems to be working without problems when connected to power and the programmer but when connecting the FT to usb it enters a reset ...
user avatar
-1 votes
1 answer
312 views

VCC to ground confusion

I recently reached out for help about uploading Arduino code to a pcb I designed for an LED watch. It was pointed out that I had a couple of errors in my circuit design: “First, R9 should be a pullup ...
user avatar
  • 3
0 votes
1 answer
75 views

Missing 1 bit shift Bitbang I2C Atmega328p

I implement bit-banging I2C on Atmega328P and met the problem when the Master receives data from the slave. I'm in depression in debugging this code since I found no problem. Master Write work ...
user avatar
1 vote
4 answers
108 views

Atmel SPI "wait for transmission complete" example is wrong?

I am configuring my first SPI transmission on my atmega328p. Everything seems right (My SPI interrupt ISR(SPI_STC_vect) fires when transmission is done, and I can see all SPI pins on the oscilloscope ...
user avatar
4 votes
3 answers
369 views

Running barebones ATMEGA328P on 3.7 V battery

I have some questions regarding running an ATMEGA328P from a 3.7 V battery. These batteries can vary their voltage during discharge from 4.2 V to 3.0 V. So my questions are: If I power the ATMEGA328P ...
user avatar
0 votes
1 answer
112 views

Need help with standalone circuit; atmega328p and WS2812

I have a problem involving those two modules, can't keep them work together in board for more than 30 secs. Randomly, leds WS2812D-F5 w/ WS2812B-B, starts to turn on when should be off and then all ...
user avatar
1 vote
0 answers
70 views

Why ATMEGA328P U-TH doesn't answer to USBasp but work fine with Arduino as ISP?

I ordered ATMEGA328P AU from China recently but I got "ATMEGA328P U-TH". which seem super problematic. I try to use USBasp to burn bootloader but it fail and show error message as shown. <...
user avatar
  • 952
0 votes
1 answer
64 views

ATmega 328p arduino bootloader factory reset cause

I am using an ATmega328p with an Arduino Nano bootloader on a custom board. We got recently an issue where the bootloader got reset. I need to return the bootloader and then the firmware in order to ...
user avatar
  • 285
0 votes
3 answers
322 views

How can I upload my code to Atmega328p?

There is no problem with uploading program on the first chip by using Arduino IDE. However, the following chips doesn’t work. Status is shown as uploading and it hangs there. I think it could be ...
user avatar
  • 171
1 vote
1 answer
91 views

Changing Bootloader settings using HEX file in atmega328P

I am using atmega328P IC in my project. Currently my process to upload a code is to burn the bootloader according to my requirements and then upload using programmer USBasp . Now from what I read is ...
user avatar
  • 377
1 vote
2 answers
162 views

Need help fault finding a custom PCB

I am designing a custom circuit board for a CG scale test instrument to find the centre of gravity for model airplanes. My design is based on the model here: https://github.com/olkal/CG_scale and it ...
user avatar
  • 427
0 votes
2 answers
164 views

ICSP / ISP issue when programming ATmega328P

I've designed a custom PCB that I'm trying to program through ICSP using AVRISP mkII and I've run into some issues. I'm using Arduino IDE for programming, but I don't think this is relevant. The IDE ...
user avatar
  • 33
0 votes
4 answers
72 views

Is this the correct way to compute or the resistor for the ATMEGA? and how to compute for the fuse?

Is this the correct way to solve the resistor for the ATMEGA? The ATMEGA can only handle 6.6mA 4.98v @ 16Mhz but my transformer outputs up to 2Amps of current. This is my first time that I designed a ...
user avatar
0 votes
2 answers
90 views

FT232 Chip as UART to USB freezes windows and and access denied

(Posting my own solution here) I was trying to use a FT232 to communicate with my Atmega328p-AU (arduino uno's MCU) and even though I had several times made this connection which worked fine, this ...
user avatar
0 votes
0 answers
155 views

ATMEGA1284p and RFM95 sleep current around 35µA: can it be reduced further?

In my project, I am using an ATMEGA1284p processor in the TQFP-44_10.0x10.0x0.8P package as well as a RFM95 LoRa module. For the low-power mode, I'm using the rocket scream low-power library: https://...
user avatar
0 votes
1 answer
245 views

ATMEGA328P Max Clock Speed Without Divider

Does anyone know what the max clock speed of the ATMEGA328P is, without the clock divider? I know that people have been able to overclock the 328 to 30 - 50 Mhz, but I haven't found if those are using ...
user avatar
  • 1
1 vote
2 answers
76 views

Problems connecting an Arduino Uno to a Commodore 64 Joystick port

I have made up a DB9 connector, which is the connector that fits the Commodore 64's joystick port. A small program on the Arduino sends HIGH signals to pins 1,2,3 and 4 of the connector. Another small ...
user avatar
0 votes
1 answer
97 views

Can SPI SS pin be used as PWM output by slave on ATMEGA328p-AU?

Working on designing an ESC for BLDC motor and I need 6PWM. I am using ATMEGA328p-AU. I need to program the M328p after its in the PCB so I need to leave some pin outs for SPI. But some PWM and SPI ...
user avatar
0 votes
2 answers
97 views

How to reduce power in barebone setup of atmega328p?

For every 15 minutes once ultrasonic sensor data will be send to the receiver using nRF24L01. I'm using atmega328P with battery power using AAA*3 battery and it should operate at least 15 days. Can ...
user avatar
1 vote
0 answers
71 views

Using Data Visualizer with Atmle-ice with SPI Physical interface

I am trying to output some debug strings from an AtMega328P to a terminal window on AtmelStudio using the DGI. I would like to use the 6-pin 100-mil connector of my Atmel-ICE Basic Kit, which I ...
user avatar
  • 147
0 votes
0 answers
117 views

How can I improve the design of my electronic speed controller?

We have a brushless motor with the following characteristics (Slow(8T)): For that motor, we are developing an electronic speed controller using the hall sensors. The microcontroller is an atmega328p ...
user avatar

1
2 3 4 5 6