Go Down

Topic: Burning bootloader atmega328P-AU using USBtinyISP (Read 706 times) previous topic - next topic

jjunki20

Hello guys,
I am now designing a new PCB Board for my project and having trouble in burning bootloader atmega328P-AU using USBtinyISP. And MCU is running with the supply voltage of 3.3V with Voltage regulator.

After setting Board/Processor/Programmer in the arduino [Tools] as attached below,

I tried to burn bootloader.
But the result always says "error: usbtiny_transmit: initialization failed, rc=-1"

(Many other folks also attach the full output of avrdude, however, I do not know how to get the full output. Please let me know this one as well.)

Here is my circuit design. Please see the below image.


First, I have one quick question.
Many people suggested that I connect reset with 10k ohm resistor. (as attached below)


If this is not the issue, then, how can I troubleshoot this problem?
Is it a matter of the settings in Arduino program (Board/Processor/Programmer)?

Please help me guys!

Thanks
Best

m_k_akash

I think its a software problem. Check this out. To get the verbose output you should enable it in the preferences of the Arduino ide
You asked me and I am here

kprims

https://static-cdn.imageservice.cloud/5425761/in-circuit-system-programming-icsp-using-usbtinyisp-and-arduino.jpg

Check your 6 Pin J3 connector. Looks like your pins are not the same as a standard connector. if you are using the 6 Pin cable with the USBTinyISP then it will not work.

The 10K resistor isn't needed for ISP programming usually, but you would want it for USB-TTL programming using the bootloader.

jjunki20


Above image is actual top view of the 3x2 connector.
And I checked this is correct
Could you please validate it once again?
Thanks

m_k_akash

Are you powering your circuit with the usbtiny isp while programing ?
You asked me and I am here

kprims

Quote
Above image is actual top view of the 3x2 connector.
And I checked this is correct
Could you please validate it once again?
Thanks
This is the layout of the 6 lead cable. I don't think they match up unless you are using individual single leads back to your USBTinyISP.
https://www.iot-experiments.com/content/images/2017/11/icsp_6pin.png

jjunki20

#6
Jul 01, 2020, 04:41 pm Last Edit: Jul 01, 2020, 05:10 pm by jjunki20
I think its a software problem. Check this out. To get the verbose output you should enable it in the preferences of the Arduino ide

It doesn't work with a USB 3 port
We've noticed that USB 3 ports are sometimes a little more sensitive than USB 2. In this case you can try changing the cable (see this article) or placing an every-day USB hub between the USBtinyISP and your computer.

I'm running avrdude and I get "error: usbtiny_transmit: initialization failed, rc=-1"
This response means that it found the USBtiny, but could not communicate with it. The likely reason is that you found a version of avrdude that was not from WinAVR.
Differences in new versions of avrdude mean that it doesn't work with the libusb-win32 USBtinyISP driver.
Let me try to use every-day USB hub as my labtop only has usb 3 ports!
Is there any other suggestion?
I will try it right now
Thanks

CrossRoads

ICSP header is wrong
MISO  1   6   VCC
SCK     2   5  MOSI
Reset   3   4  GND

The programmer holds Reset Low during programming, if the Reset line is not held low, then programming will not be enabled.

Also, after you get the bootloader installed, you will need a 10K pullup resistor on Reset to pull the line after the DTR pulse pulls it low via the 0.1uF cap. 
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jjunki20

#8
Jul 01, 2020, 05:09 pm Last Edit: Jul 01, 2020, 05:16 pm by jjunki20
Are you powering your circuit with the usbtiny isp while programing ?
ICSP header is wrong
MISO  1   6   VCC
SCK     2   5  MOSI
Reset   3   4  GND

The programmer holds Reset Low during programming, if the Reset line is not held low, then programming will not be enabled.

https://ibb.co/w0n9T5D
(image upload is not working)

This is how I powered the board (using external 3.7V battery)
and how I connect the USBtinyISP to the board.


https://ibb.co/NT6R8gj
But this red light never lights up which means it is not connected with the target correctly.

CrossRoads,
"The programmer holds Reset Low during programming, if the Reset line is not held low, then programming will not be enabled."
Could you be more specific on what you meant by this? And how can I check if the reset line is held low?

Thanks everyone!

Go Up