I recently bought an Atmega328P-PU chip to make a diy arduino, but can’t get it to work.
I have looked around the forum but couldn’t find a solution that worked.
Basically i have got everything hooked up like the image below:
The only difference is that i have an LED on pin 13, but can’t get it to do anything.
The bootloader is properly loaded, because when i put it directly onto my Arduino Uno i can use it as normal.
Don't forget some bypass capacitors between +5v and Gnd.
The most critical component is the crystal. Make sure it's going to the right pins and both ends of the crystal have 22 pF caps to Ground. If you accidentally use 22 uF capacitors it won't work.
I have a setup to mass program the chips, and it didn't work either. Followed Nick Gammon's instructions. Turned out that was a short between two tracks on the board AND I had an issue with the caps and crystal being one set of pins up from where they should be.
If you have the wiring correct (you don't, no power rail bypass caps for a start) then it will work.
I recently bought an Atmega328P-PU chip to make a diy arduino, but can't get it to work.
I have looked around the forum but couldn't find a solution that worked.
Basically i have got everything hooked up like the image below:
The only difference is that i have an LED on pin 13, but can't get it to do anything.
The bootloader is properly loaded, because when i put it directly onto my Arduino Uno i can use it as normal.
Does anyone have any idea what i'm doing wrong?
A question: what sketch is currently uploaded, the blink one?
This is a picture of my breadboard, i disconnected the LED temporarily for visibility.
The LED works when connected to the Arduino Uno pin 13, so it couldn't be a faulty LED.
How do you upload a sketch ? with a usb-serial converter ?
Can you tell more. The led works ? Only for the bootloader or also with the Blink sketch ? If the Blink sketch works, what is the problem ?
ChilliTronix:
You have no power rail caps. Put them in for a start.
Just added them, still nothing
Peter_n:
How do you upload a sketch ? with a usb-serial converter ?
Can you tell more. The led works ? Only for the bootloader or also with the Blink sketch ? If the Blink sketch works, what is the problem ?
I uploaded the sketch by putting the chip on an Arduino Uno board, that's also how i verified the LED worked and that i didn't just have a fried chip or something. So everything works when the chip is on the Arduino Uno, but not when it's on the breadboard.
Wow! I'm glad you found the problem. That never crossed my mind.
Don't hesitate to keep asking These things happen to all of us. The problem might be just as well in the area that is least expected.
Echelon:
Allright, i feel stupid now
I ordered new parts and it turned out to be a busted crystal.
Thanks for all the replies!
Sometimes the breadboard adds load capacitance to the crystal, exceeding the recommended one and preventing it to work well. To avoid this I try 18 or 20 pf caps.