Recently I started to learn embedded electronics and C/C++ and for a couple of days I tried and I am still trying to burn a new ATMega328P U bought from Aliexpress. From what I know new ATMega328P's come with bootloader included, but after I wired everything up and connected the FTDI FT232RL to load the sketch (wiring is completely right after many many hours of checking on the internet for a dozen of pictures), I get errors like "programmer is not responding" in case of sketch upload and "error while burning the bootloader" or "Yikes, signature bla bla". I don't think the FTDI is the problem since the Arduino IDE recognizes it as COM7 on my PC. Now here's my question: is my atmega328p u broken or have I missed something during the process of both (trying to) burn(ing) the bootloader and upload(ing) the blink sketch? (I have also tried uploading the board programmer from Nick Gammon on my arduino Uno and the burning the bootloader AND followed the instructions from arduino.cc "from arduino to microcontroller on a breadboard"). If you need pictures of some sort, I'll provide them
Asked
Active
Viewed 886 times
3
-
ATMega328 don't come with the (Arduino) bootloader preprogrammed, unless you specifically orders ones that do (where the seller has done that for you). You can't burn the bootloader with the FTDI. You can indeed use a separate Arduino board to act as an ISP programmer, so you can burn the bootloader. – Gerben Sep 28 '20 at 18:20
-
I know I can't do the burn with the FTDI, that's why I tried to use my Arduino UNO to load the ArduinoISP on it and burn the bootloader on ATmega like this... But no luck whatsoever. And I can't find any tutorialnor solution that can fix my problem – Vlad George Sep 28 '20 at 18:54
-
Since you don't provide any specifics, we can't do any better than link to those two methods. Did you get any error message when burning the bootloader? Can you verify that the bootloader is installed (led on pin 13)? A picture would help, in case there's something mis-wired. – Gerben Sep 28 '20 at 19:01
-
1I don't have anything wired right now, but tomorrow I'll send some pictures here, errors, wiring and whatever can help – Vlad George Sep 28 '20 at 19:03
-
2There is no such thing as an ATMega328P-U. There's the ATMega328P-PU or the ATMega328-PU - the former is what is used on the Uno, but it sounds like you have the latter. – Majenko Sep 28 '20 at 22:08
-
1https://imgur.com/gallery/rAEq9kg – Vlad George Sep 29 '20 at 05:52
-
1I am not sure if the tutorials vary from model to model. All I want to know is if there is someone who knows a method that is guaranteed to work for my model in the picture above. Or at least show me what is the problem in what I did. I really want this to work and reach higher and higher in knowledge of circuits and programming – Vlad George Sep 29 '20 at 10:46
-
Fwiw I’ve come across the ATMega328P U (like the one in your photo) and I suspect it’s not an official Atmel chip (i.e. it might be counterfeit), although I’m not sure, That said, the ones I have seem to be behaving completely normally and can be programmed with a bootloader in exactly the same way. – StarCat Sep 29 '20 at 10:48
-
328P is the model. Package type is the next letter (P for SPDIP) and temperature range the last letter (U = -40C to +85C). There has to be a hyphen between the model and the package type. Anything else is fake. Possibly a 328-PU clone with dodgy labeling. – Majenko Sep 29 '20 at 11:33
-
1So it results in the posibility of not being able to correctly burn the bootloader and work with it? (sorry if my questions are too dumb or "captain obvious" - ish, but I'm learning on my own) – Vlad George Sep 29 '20 at 11:37
-
Do you have some bare minimum circuit around the MCU? Mainly Xtal (usually 16MHz but the bootloader can be also for 8MHz or the internal 8MHz). Also you have to have "auto reset" circuit too (DTR -> capacitor -> reset pin and pull-up) - otherwise you have to reset the MCU into bootloader mode in short period time before the arduino starts the actual upload... – KIIV Sep 29 '20 at 11:42
-
https://imgur.com/gallery/ZX9el3x, this is the picture with the minimal circuit I think you are talking about. 2 22pF capacitors, 16MHz oscillator, wires for gnd and 5v where necessary and the first 3 pins for FTDI usage. I did saw a schematic with a switch button added for reset functionality, but I didn't give it much attention. Could that be the solution for everything? – Vlad George Sep 29 '20 at 11:51
-
@VladGeorge If you have FTDI with accessible DTR, it should be possible to add capacitor between DTR and RESET pin to enable auto reset - [info in section auto reset](https://www.baldengineer.com/diy-arduino-schematic-checklist.html). Otherwise reset button and good luck with pressing reset in the right time. Btw, you should also look into section Decoupling capacitors. – KIIV Sep 29 '20 at 12:15
-
I did try to do that, that's why on the 1st pin I put a 100nF capacitor. And when I try to burn the bootloader I get an error regarding the signature... And the circuit is working because at first I programmed the ATmega that was on the Arduino UNO and managed to get blink and fade sketches working on it. But when switched to the individual ICs... Neither the burn or the sketches worked. I'll try to do it manually, with a button on the first pin, and keep you updated – Vlad George Sep 29 '20 at 12:20
1 Answers
2
IT WORKED, FINALLY. I followed this tutorial: https://www.electronics-lab.com/project/installing-the-arduino-bootloader-on-the-atmega328p-microcontroller/, followed exactly as it is explained, made the connections (nothing more, nothing less; I even removed the LED on pin 19 and its resistor) and to my surprise... the bootloader was actually loaded and the sketches were uploading just by using the FTDI. Thank you a lot for your help and information and I hope someday I'll pass this knowledge to someone who will be in the spot I was until now. Have a great time and love ya all
Vlad George
- 51
- 2