Upload program via USBasp

Hello All,

I require some advice.

I installed a blank atmega328p-pu chip on Arduino uno R3 and succesfully uploaded bootloader via USBasp; uploaded the code to atmega via normal process(usb connected to PC and arduino).

After that I pulled out that ready 328p-pu and started using it in my external circuit. Now I want to upload the code to the chip in my external circuit without using arduino. For that I made the ICSP connectors. I dont have an FTDI cable at the moment.

My question is, can i upload the code via USBasp ?

Regards,

Safi

Yes, subject it from tools programmers, and to upload, choose upload using programmer (file menu), instead of clicking the upload button or doing upload.

Using ISP and USBASP, still always burn the bootloader first, (as you've done), to set the chip's internal fuses correctly, then follow with "Upload using programmer". If "UNO" is selected when this is done, the fuses will be set to those of a standard UNO - 16MHz oscillator etc.

safiullahtariq:
For that I made the ICSP connectors. I don't have an FTDI cable at the moment.

But you have a UNO! The "FTDI cable" is built into it. If you open the "RESET-EN" link and solder pins for a jumper over it, you can use the side of this jumper that is not the reset pin, as the reset on your external board, plus port pins 0 and 1 as RXD and TXD and put the jumper on pins 5 and 6 of the ICSP header to hold the UNO chip in reset while you use it as your USB to TTL interface.

And you should order a couple of not FTDI, but USB to TTL boards from eBay so that you can do this more easily in future.

Note that you need to provide a 0.1 µF capacitor in series with the DTR line of that board to your reset pin with the 10k pull-up.


Now if instead you use the USBASP and have in whatever fashion, burnt the bootloader at least to set the fuses, note that in using the USBASP to download a sketch, you have wiped the bootloader and cannot at that point use serial downloading (unless you re-burn the bootloader).

Is there a like button for you people ? :slight_smile:

Thank you for your replies.

I was getting an error, now i know that i have to burn the boot-loader first and then upload the code. Tomorrow I will try this and let you people know of my success.

Very best Regards,

Safiullah

safiullahtariq:
Is there a like button for you people ? :slight_smile:

Thank you for your replies.

I was getting an error, now i know that i have to burn the boot-loader first and then upload the code. Tomorrow I will try this and let you people know of my success.

Very best Regards,

Safiullah

Take a bit of time and read Nick's great article on bareboard 328's:

Ray

My Projects

Thank you for your replies and making me understand.

I was able to load the sketch. I followed you all and also the following link to give me a clear idea.

Thank you.

Regards

Safi