Hello, I have a problem with my atmega328 because it doesn't work until it connects pin 1 to GND. I will add that pin 1 is connected via a 10k resistor to 5V. Does anyone have any ideas what might be wrong?
Welcome to the forum
Why ?
Many tutorials say to connect pin 1 reset to vcc to avoid resetting the microcontroller.
Did you mean to say "until I connect pin 1 to GND"? Or did you mean that the chip connects pin 1 to ground itself somehow? If so, how does it do that?
Please never say "it doesn't work". No one can help you fix that because no one knows what you wanted it to do, or what it is doing. So please explain those things.
Do you mean physical pin 1 of the 28-pin dip chip, or arduino digital pin 1?
I think you should post a schematic so we can see how everything is connected.
Sorry, I never wrote a post to solve my problems, but this time I can't find anything on the internet.
yes, I wanted to say until I connect pin 1 atmega to GND.
I use the atmega328 chip itself, no arduino, it has a crystal and 22pF capacitors
The controller is to control 2 dc motors using the L9110 and HC-05
But you will use the Arduino IDE to upload an Arduino sketch to the chip? If so, you are using the chip as an Arduino. Because it is used as an Arduino, it will have an Arduino digital pin 1, which is not the same pin as physical pin 1.
In the image above, you can see that physical pin 1 is also marked RESET. Arduino digital pin 1 is physical pin 3 and is also marked TXD.
I use Arduino IDE to upload sketch. And also I talk about 1 physical pin from atmega328.
If you connect physical pin 1, the RESET pin, to ground, the chip will remain in reset mode and will not run the code you uploaded. Only when you disconnect it from ground, and allow the 10K to pull the pin up to Vcc, will the code begin to run.
Are you saying that the code is running when RESET is connected to ground? Or does it begin to run when you disconnect RESET from ground?
Do you also have 2x 0.1uF caps connected to the 2x Vcc pins of the chip?
Code works only when im connect reset to GND
no i don't have capacitors, can i use electrolytic capacitor?
That is the opposite of what should happen.
No, you must have them and they must be 0.1uF ceramic caps.
I did not know that I could write Polish!
if they have to be ceramic, I have to order and wait, I will let you know if it helped when I mount them.
Can work on ATMEGA with reset connected to gnd, or I can damage it?
Atmega will not work with RESET connected to ground. I do not understand how what you say can be true. But connecting RESET to ground will not damage the chip.
I have no idea why this is happening, I will add that it is a small project that I designed myself in easyeda, on the breadboard the reset worked properly, and on the pcb it did not. can I share my pcb and someone can check what is wrong?
Post the PCB and the schematic that you used to produce it
Excellent tutorial on making your own "bare bones" Arduino:
https://www.gammon.com.au/breadboard
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.