Thank you for this video. I've searched for this information and viewed other videos and was still not sure what to do until I came across your video. Well explained and illustrated. Cheers, Peter
Thanks for this video, I replicated this circuit but made a slight change to it with a soldered copper veroboard instead with predrilled holes at the right pitch . Changed to an external LED in series with a 1.5K ohm resistor works perfectly fine with ICSP (SCK) PB5 port pin (13) , [You don't need to modify the original sample Arduino Blink Sketch] you also get a visual indication from the LED that it is writing to the FLASH, I had one USBasp programmer work function OK with this circuit, but another of the very same type failed to detect the chip signature, so that is another aspect that one has to bear in mind, to successfully make this particular circuit work.
Thanks a lot for posting this. I am having a lot of trouble burning a bootloader. I have put breakout pads for SS, SCK, MOSI and MISO on my board, also have the 10k pull up resistor on the board as well. Using an UNO no luck and lots of frustration. I can upload using the UNO just fine for a pro mini board but a stand alone chip, nada....I haven't tried using an ISP programmer but I have one in my drawer so I'll get that out when I get home and try it. I really appreciate your video! It has answered questions I haven't been able to find elsewhere! Subscribing now!
when I open ardino IDE, it says that no port was found. Although, I installed the driver libusbK for the programmer. By the way, my programmer has one more jumper, one is for swapping between 3,3 and 5 V (JP21), and the other one - I have no idea what it does (jp1). Also, I have two more holes for another jumper, jp3. PLUS: I once burned a bootloader on the smd chip using an arduino nano. The bootloader remains on the chip? When I try to upload the blink code, an error occurs (Failed chip erase: uploading error: exit status 1) + "Double check connections and try again, or use -F to override this check."
Thank you, this worked very well and the newest version of the usbASP driver works great too. This was the only video I watched and yet it was the only one I needed. Thank you again, this shit was epic.
Worth noting... I am using an arduino Nano as a programmer and have been successful, both on breadboard circuit and prototype pcb. Both successful, in fact using a Mac it has been almost impossible to update the driver for the common usbasp programmer that is sold online - so I kinda had to go with a Nano, or other arduino board as the programmer. Anyway! It's workiiiiiing! :D Nice job Kakushin! Cheers!
if you connect the programmer on chip direct on pcb with the same way like yours is there problem ? or you must desolder the ic and follow the process that you show us
Yes, the main-stream suppliers seem to be out of stock. But you can still get them from China (aliexpress etc) but they are more expensive than they used to be. Here is a link to some on AliExpress $10 per chip. www.aliexpress.com/item/32880625265.html
Hey, I can't seem to make the UART with RX and TX (serial) work. The I2C also doesn't work and somehow only the digitalwrites are working. Any idea whats going on? I've litteraly used the same chip, same circuit and same programmer
Hello Kakushin Why do you burn the bootloader first? I thought the bootloader is not necessary anymore when programming via ISP. I thought when programming via ISP a previous burned bootloader will be deleted and the whole program memory is now available. Best regards, Tom...
I'm not sure, but all the Atmega328 microcontrollers I've come across come from the factory empty without bootloaders in my experience. Once the bootloader is loaded I've always been able to upload new sketches without reburning a bootloader. Hope that helps.
Yes, the same code that works on an Arduino Nano will work on this Atmega328P-AU chip (because the Nano uses this chip). Just need to match up the pins on the chip to the Nano.
I have made a a PCB using this chip and for reset i have already put a switch between ground and 10K resistor with 5V supply so do i need to press it while uploading
may you have a great day Sir, Sir please let me know that this circuit using 16Mhz Crystal Oscillator and 22PF capacitor will work with Bluetooth as well. because my circuit with same programing is working with Arduino UNO but when i try to use atmega328, oscillator and Capacitor it not accept any command.
Get a thin wire, solder it on the pins needed, solder the thin wire onto some female or male jumpers, no need to pay 20 dollars for something you will only use once.
Nice video. Thanks. I have a spl scenario. On my usb asp the main chip is damaged and i gavevspare atmega8a . I can solder it . But i wascunable to load the ubadp firmware into it wuthbusb access . Ppeadecsuggestva practicabe way. Thanks Regards Sarma vu3zmv
A Pololu programmer is easier to order, and actually easier to use. $7.77 USD from Digikey. Just search for "Pololu 2183-3172-ND". I have another video which shows exacly how to use that programmer.
Hi. This is a very good video, however i`m not sure which chips i can use. I`ve got a lot on my Mini and Migthy Core boards but none with the PU or AU at the end. Just ATMega328 etc. Will any of these work in my project?
P stands for the low power version and might not always be printed on the chip. Mini-Core boards and Arduino Nano''s both use Atmega328 chips in the QFN32 format. If the chip is already soldered into the Mini-Core board then I'd recommend using online tutorials for that board.
Hi - I'm trying this but when I burn the bootloader it gives me avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. Only difference is that I'm uploading using the Nano and with Arduino as ISP instead of the ISP Programmer everything else I'm doing the exact same as in your video. Any suggestions?
Hi, you're not alone. I was getting exactly the same avrdude errors when I tried using a Nano as the ISP (except my Device signature was showing random combinations of 0's and f's). I tried for hours and couldn't get it to work. When I googled for solutions everyone just suggested re-checking the connections and changing capacitor values, but I still couldn't get the bootloader burned. Then I tried using the ISP Programmer and everything worked seamlessly. Sorry if that doesn't help your situation, but the only thing I can suggest is to get an ISP Programmer.
@@KakushinAU Hi - Thank you. I got an ISP Programmer. But now I'm getting this error while burning: avrdude: auto set sck period (because given equals null) avrdude: error: program enable: target doesn't answer. 1 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. Do you have any suggestions for this?
I was able to replicate the following error codes in several scenarios. avrdude: auto set sck period (because given equals null) avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: error: program enable: target doesn't answer. 1 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. Scenarios: 1) Disconnecting any 1 of the 6 ISP programming connections 2) Reversing the MISO and MOSI connections 3) Disconnecting the oscillator 4) Changing the USBASP windows driver back to libusb-win32 Unfortunately the error codes are exactly the same in all scenarios, so it could be any one of them. As soon as I put everything back to the setup shown in the video I was able to reburn the bootloader. Good luck, and let us know how things go.
@@bobk8901 Hi, check your wires. I spent hours and hours trying to solve this error until I decided to check continuity with a multimeter and found 1 faulty wire.
I've used the RX and TX pins to program an ESP32 (see my bitcoin tracker video) but I haven't tried it with an Atmega328. Most newer generation Atmega chips have migrated to using the UPDI pin for programming using a single connection.
Unsure! I'll let you know! I can't really see why not as long as you're caps/oscillator crystal are identical, basically 1:1 circuitry on both pcb - I imagine it will work! Gonna test for my own use case so will update!
Hallo sir can you tell me how to upload bootloader in atmega32U4-MU. I am waiting for your reply. If you unable to make video please write a step by step as blog and send me the url. Please respons as early as 🙂 possible
Hi. There are a few tutorials for the 328p dual in-line package (DIP). Here is a link to one: www.instructables.com/Getting-Started-With-the-ATMega328P/
Thank you for this very informative video.All your demonstration worked like a charm for me !! For that THANKS A LOT. It gives me several ideas for projects :-) Unfortunately, at this date, the Atmega 328, among others, is out of stock for a very long time at the main suppliers (Farnell, DigiKey, Mouser, ..) :-( The shortage of components, even simple, does not reassure us about our future 😞 Take Care
Thanks for the comment. Yes, the chip shortage is not great for makers. The main suppliers are out of stock but there still seems to be some availability directly from China www.aliexpress.com/item/1005003022628090.html The quality isn't guaranteed and shipping takes a long time but I personally haven't received any defective components so far.
HI Can we upload bootloader into a New IC without External clock.. Because i see there is an internal clock on Atmega328pb. Is there any Circuit for that?
Hi, I just tried it but wasn't able to get it to work. I happen to have several PB chips I had purchased by mistake. I burned a bootloader to the fresh Atmega328pb-au (I changed the clock setting to "Interal 8Mhz", and the chip variant to "328PB"). The bootloader seemed to burn just fine, but then I wasn't able to upload any sketches regardless of what Arduino AVRboard I specified. I think I'll stick to using Atmega328p-au chips with an external oscillator. I've also heard that the internal oscillator isn't very accurate and can cause problems if you are doing any serial communications. Sorry.
@@KakushinAU Hi Thanks for Reply.. I have done the same and 2 days ago it worked but the arduino sketch wont upload. I tried a hack i have compiled code and generated hex file using arduino and uploaded the hex file using an external ISP file.. It worked Flawless.. Hope you can try that out..
@Kakushin: Thanks for your tutorial, your solution helped me to upload the code, previously I tried with nano but not successful. Used USBasp and bootloader is done and also uploaded the blink program. But LED is NOT blinking at all. Tried with all digital pins. I am using atmega328pu smd controller. Can you please help me on this
Sorry, seems like you have the same controller and it should work. You may have already checked the following: 1) loose connections 2) 5 volt power supply (3.3v may not be enough depending on your brown-out-detection setting) 3) reversed LED leads 4) bad resister. Worse case maybe you've got a bad controller. Good luck.
cant you just get a pair of arduino uno's and make one the bootload burner and shove this clam shell in the other one? i'd rather do that then buy extra components that will end up in the void of space when im done with this project. i got 30 Atmega238P-AU ic's to burn.
Good idea, but unfortunately the pin-outs wouldn't match. The Atmega328P chip in the Uno has 28 pins (DIP-28), while the Atmega328P-AU chip has 32 pins (TQFP-32). Therefore the clam shell won't match up properly.
I've never been so excited to see a flashing LED before, thank you.
Finally i've made a functional PCB for isp programming my core stock, thank you !
Thank you for this video. I've searched for this information and viewed other videos and was still not sure what to do until I came across your video. Well explained and illustrated.
Cheers, Peter
Thanks for this video, I replicated this circuit but made a slight change to it with a soldered copper veroboard instead with predrilled holes at the right pitch . Changed to an external LED in series with a 1.5K ohm resistor works perfectly fine with ICSP (SCK) PB5 port pin (13) , [You don't need to modify the original sample Arduino Blink Sketch] you also get a visual indication from the LED that it is writing to the FLASH, I had one USBasp programmer work function OK with this circuit, but another of the very same type failed to detect the chip signature, so that is another aspect that one has to bear in mind, to successfully make this particular circuit work.
Thanks for your comment. Very good points.
Thanks a lot for posting this. I am having a lot of trouble burning a bootloader. I have put breakout pads for SS, SCK, MOSI and MISO on my board, also have the 10k pull up resistor on the board as well. Using an UNO no luck and lots of frustration. I can upload using the UNO just fine for a pro mini board but a stand alone chip, nada....I haven't tried using an ISP programmer but I have one in my drawer so I'll get that out when I get home and try it.
I really appreciate your video! It has answered questions I haven't been able to find elsewhere!
Subscribing now!
I appreciate this. I always wondered how to go about flashing the chocolate chip variety of this MCU
Very good .. I can bootloader the microcontroller Atmega328 pu with a QFP32 and compile my sources. Everything works.
Thank you.
Kakushin! Thankyou so much! Incredibly valuable tutorial! Cheers!
After 2 weeks, I could upload a code. Thamk you 👍🙌🙌🙌
when I open ardino IDE, it says that no port was found. Although, I installed the driver libusbK for the programmer. By the way, my programmer has one more jumper, one is for swapping between 3,3 and 5 V (JP21), and the other one - I have no idea what it does (jp1). Also, I have two more holes for another jumper, jp3.
PLUS: I once burned a bootloader on the smd chip using an arduino nano. The bootloader remains on the chip? When I try to upload the blink code, an error occurs (Failed chip erase: uploading error: exit status 1) + "Double check connections and try again, or use -F to override
this check."
You have saved my life, thank you so much for sharing your knowledge, YOU ARE AWESOME!
x2
Thank you, this worked very well and the newest version of the usbASP driver works great too. This was the only video I watched and yet it was the only one I needed. Thank you again, this shit was epic.
Worth noting... I am using an arduino Nano as a programmer and have been successful, both on breadboard circuit and prototype pcb. Both successful, in fact using a Mac it has been almost impossible to update the driver for the common usbasp programmer that is sold online - so I kinda had to go with a Nano, or other arduino board as the programmer.
Anyway! It's workiiiiiing! :D Nice job Kakushin! Cheers!
Thanks for the comment. That's a good reminder that even a Nano can be used as a programmer.
Very useful video, thank you. Do u have another one, how to make a board with the Atmega328 chip - i mean what it needs to standalone?
Thank you sir! You heldped me a lot!
From where you bought this atmega328p?
thank you, sir. it's working perfectly.
if you connect the programmer on chip direct on pcb with the same way like yours is there problem ? or you must desolder the ic and follow the process that you show us
Hello, i've a project in mind with this chip but I can't find it anywhere... I don't know why but it is out of stock EVERYWHEREEE :((
Yes, the main-stream suppliers seem to be out of stock. But you can still get them from China (aliexpress etc) but they are more expensive than they used to be. Here is a link to some on AliExpress $10 per chip. www.aliexpress.com/item/32880625265.html
Hey, I can't seem to make the UART with RX and TX (serial) work. The I2C also doesn't work and somehow only the digitalwrites are working. Any idea whats going on? I've litteraly used the same chip, same circuit and same programmer
Hello Kakushin
Why do you burn the bootloader first? I thought the bootloader is not necessary anymore when programming via ISP.
I thought when programming via ISP a previous burned bootloader will be deleted and the whole program memory is now available.
Best regards, Tom...
I'm not sure, but all the Atmega328 microcontrollers I've come across come from the factory empty without bootloaders in my experience. Once the bootloader is loaded I've always been able to upload new sketches without reburning a bootloader. Hope that helps.
You can also use Microchip Studio 7 to burn the boot loader.
This video was just what I needed, thanks :)
Atmega 8a program has restart problem in any type sparking in wire they have distrub a program
is the same code? just macth pins?
Yes, the same code that works on an Arduino Nano will work on this Atmega328P-AU chip (because the Nano uses this chip). Just need to match up the pins on the chip to the Nano.
Could you use arduino nano to burn a bootloader to a chip?
Thank you for this very informative video!!!!!!
Dear sir can you give me ( n clamshell test adapter) link?
Here is where I bought my TQFP32 test adapter www.aliexpress.com/item/32811311116.html
It looks like that ISP Programmer is sold out everywhere I look. Could you recommend any other compatible programmers?
The Pololu programmer also works well with the Atmega328P. See this other video using that device ua-cam.com/video/ZscDJ-xO4tA/v-deo.html
@@KakushinAU Thanks!
I have made a a PCB using this chip and for reset i have already put a switch between ground and 10K resistor with 5V supply so do i need to press it while uploading
may you have a great day Sir, Sir please let me know that this circuit using 16Mhz Crystal Oscillator and 22PF capacitor will work with Bluetooth as well. because my circuit with same programing is working with Arduino UNO but when i try to use atmega328, oscillator and Capacitor it not accept any command.
No bootloader is required if using an ISP programmer ! A bootloader is only needed if using a TTL to USB serial board.
Get a thin wire, solder it on the pins needed, solder the thin wire onto some female or male jumpers, no need to pay 20 dollars for something you will only use once.
Thank you, it was very helpful!
Nice video. Thanks.
I have a spl scenario. On my usb asp the main chip is damaged and i gavevspare atmega8a . I can solder it . But i wascunable to load the ubadp firmware into it wuthbusb access . Ppeadecsuggestva practicabe way.
Thanks
Regards
Sarma vu3zmv
thank u for the video it really helped
Hey, I dont have the USBasp i cant find it. What can i Do?🥴
A Pololu programmer is easier to order, and actually easier to use. $7.77 USD from Digikey. Just search for "Pololu 2183-3172-ND". I have another video which shows exacly how to use that programmer.
Hi. This is a very good video, however i`m not sure which chips i can use. I`ve got a lot on my Mini and Migthy Core boards but none with the PU or AU at the end. Just ATMega328 etc. Will any of these work in my project?
P stands for the low power version and might not always be printed on the chip. Mini-Core boards and Arduino Nano''s both use Atmega328 chips in the QFN32 format. If the chip is already soldered into the Mini-Core board then I'd recommend using online tutorials for that board.
@@KakushinAU Thanks a lot!!!
Great video! It helps a lot and ist well done. Thank you very much!
Is the capacitors necessary. I'm not using the capacitors, i'm getting target not found and initialisation error can anyone please help me
could the code work with atmega324?
Hi - I'm trying this but when I burn the bootloader it gives me
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Only difference is that I'm uploading using the Nano and with Arduino as ISP instead of the ISP Programmer everything else I'm doing the exact same as in your video. Any suggestions?
Hi, you're not alone. I was getting exactly the same avrdude errors when I tried using a Nano as the ISP (except my Device signature was showing random combinations of 0's and f's). I tried for hours and couldn't get it to work. When I googled for solutions everyone just suggested re-checking the connections and changing capacitor values, but I still couldn't get the bootloader burned.
Then I tried using the ISP Programmer and everything worked seamlessly. Sorry if that doesn't help your situation, but the only thing I can suggest is to get an ISP Programmer.
@@KakushinAU Hi - Thank you. I got an ISP Programmer. But now I'm getting this error while burning:
avrdude: auto set sck period (because given equals null)
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Do you have any suggestions for this?
@@bobk8901 Not quite sure. I'll try to replicate your errors in my setup.
I was able to replicate the following error codes in several scenarios.
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Scenarios:
1) Disconnecting any 1 of the 6 ISP programming connections
2) Reversing the MISO and MOSI connections
3) Disconnecting the oscillator
4) Changing the USBASP windows driver back to libusb-win32
Unfortunately the error codes are exactly the same in all scenarios, so it could be any one of them. As soon as I put everything back to the setup shown in the video I was able to reburn the bootloader. Good luck, and let us know how things go.
@@bobk8901 Hi, check your wires. I spent hours and hours trying to solve this error until I decided to check continuity with a multimeter and found 1 faulty wire.
Hello, I liked the video very much. I wonder if we can code it with rx and tx instead of miso and mosi pins.
I've used the RX and TX pins to program an ESP32 (see my bitcoin tracker video) but I haven't tried it with an Atmega328. Most newer generation Atmega chips have migrated to using the UPDI pin for programming using a single connection.
@@KakushinAU thank you
Is it possible to program the atmega chip on the arduino nano board, desolder it, and then transplant it to another board?
Unsure! I'll let you know! I can't really see why not as long as you're caps/oscillator crystal are identical, basically 1:1 circuitry on both pcb - I imagine it will work! Gonna test for my own use case so will update!
Превосходно!!!!!!! Все прекрасно понятно!!!!!
thank you, it is very helpful
Hallo sir can you tell me how to upload bootloader in atmega32U4-MU. I am waiting for your reply. If you unable to make video please write a step by step as blog and send me the url. Please respons as early as 🙂 possible
Hi . how to do with a dual in line atmega 328p? Thanks
Hi. There are a few tutorials for the 328p dual in-line package (DIP). Here is a link to one: www.instructables.com/Getting-Started-With-the-ATMega328P/
Thanks, it was really well explained
Great 👍
Excelente.
Thank you for this very informative video.All your demonstration worked like a charm for me !! For that THANKS A LOT. It gives me several ideas for projects :-) Unfortunately, at this date, the Atmega 328, among others, is out of stock for a very long time at the main suppliers (Farnell, DigiKey, Mouser, ..) :-( The shortage of components, even simple, does not reassure us about our future 😞 Take Care
Thanks for the comment. Yes, the chip shortage is not great for makers. The main suppliers are out of stock but there still seems to be some availability directly from China www.aliexpress.com/item/1005003022628090.html The quality isn't guaranteed and shipping takes a long time but I personally haven't received any defective components so far.
@@KakushinAU Thanks a lot ! I'm going to try your link !! regards
HI Can we upload bootloader into a New IC without External clock.. Because i see there is an internal clock on Atmega328pb. Is there any Circuit for that?
Hi, I just tried it but wasn't able to get it to work. I happen to have several PB chips I had purchased by mistake. I burned a bootloader to the fresh Atmega328pb-au (I changed the clock setting to "Interal 8Mhz", and the chip variant to "328PB"). The bootloader seemed to burn just fine, but then I wasn't able to upload any sketches regardless of what Arduino AVRboard I specified. I think I'll stick to using Atmega328p-au chips with an external oscillator. I've also heard that the internal oscillator isn't very accurate and can cause problems if you are doing any serial communications. Sorry.
@@KakushinAU Hi Thanks for Reply..
I have done the same and 2 days ago it worked but the arduino sketch wont upload. I tried a hack i have compiled code and generated hex file using arduino and uploaded the hex file using an external ISP file.. It worked Flawless.. Hope you can try that out..
Thanks. I'll definitely give it a try.
@Kakushin: Thanks for your tutorial, your solution helped me to upload the code, previously I tried with nano but not successful. Used USBasp and bootloader is done and also uploaded the blink program. But LED is NOT blinking at all. Tried with all digital pins. I am using atmega328pu smd controller. Can you please help me on this
tried selecting the board as Nano, atemga328 (minicore) but NO output.
Sorry, seems like you have the same controller and it should work. You may have already checked the following: 1) loose connections 2) 5 volt power supply (3.3v may not be enough depending on your brown-out-detection setting) 3) reversed LED leads 4) bad resister. Worse case maybe you've got a bad controller. Good luck.
شكرا جزيلا صديقي .
i this ic will ok with 20mhz crystal
Thank you! Succeeded
Nice
Very well explained
atmega328pb please
cant you just get a pair of arduino uno's and make one the bootload burner and shove this clam shell in the other one?
i'd rather do that then buy extra components that will end up in the void of space when im done with this project.
i got 30 Atmega238P-AU ic's to burn.
Good idea, but unfortunately the pin-outs wouldn't match. The Atmega328P chip in the Uno has 28 pins (DIP-28), while the Atmega328P-AU chip has 32 pins (TQFP-32). Therefore the clam shell won't match up properly.
awful background music choice.