Leostick bootloader burner

Hi All, i have a atmega328p that i am attempting to burn a boot loader to a atmega328p as when initially attempting to write to it it threw a heap of errors, and i plugged in a led on pin and it is not lit, leading me to suspect no boot loader on the atmega328, so, how do A.test to see if it is good or a dud, and B. i connected up the leostick as per the pin layout in the ArduinoISP example, burnt the file to the leostick, and, attempted to burn the boot loader and got:-

avrdude: Error: Could not find USBtiny device (0x1781/0xc9f) Error while burning bootloader.

so, is using arduino(and tried leostick and mega/uno) as a board and arduinoISP(also tried avr isp, and arduino as ISP) usbTiny as the programmer option correct? thanks all!

T6000: usbTiny as the programmer option correct?

No, you should be using Tools > Programmer > Arduino as ISP instead.

I got to attempt to burn the bootloader, and got:-

avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03 Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

So i gave up on attempting to use some of the side pins because of the non-existence of a clear layout of the leostick pins(individual) and went and got some jumper cables to hook up the isp header, and i got a different error:-

avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request. Error while burning bootloader.

Now, i have the leostick with the 1.2 boot loader, and it is recommended to upgrade, but the catch is to use another arduino, so, that would mean going and buying another arduino.

so nobody has any idea!?

Ok, so i think i know where the problem lays, the atmega328 has an old defunct bootloader that doesn't work with the new arduino 1.6-, i have a leostick that has an old boot loader too, but it takes a sketch so not an issue, so the real issue is:-

The leostick carries a atmega32U4, and i think that the error i am getting which is:-

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03

is caused by a mis-match of the frequency of the atmega32u4 (leostick at 16mhz) acting as a isp to the atmega328 on 16mhz caused by the arduino isp example not having the right options selected and/ore present, so, what do i have to do to the example to make it work? thanks All!

Which version of the Arduino IDE are you using?

Also, are you using Windows?

I am using windows 10 and arduino 1.6.9!

I think this is a Windows specific issue: ArduinoISP on the Leonardo does not work on windows · Issue #1182 · arduino/Arduino · GitHub. The workaround is explained by Arduino forum member PeterVH in ArduinoISP on the Leonardo | PeterVH but there are some modifications that need to be made for it to be compatible with IDE 1.6.9 which I have done.

  • Download the attached file.
  • Copy the enclosed folder leofix to {sketchbook folder}\hardware. To find the location of your sketchbook folder check File > Preferences > Sketchbook location.
  • Restart the Arduino IDE if it’s open.
  • Connect your Leostick to the ATmega32P correctly
  • Tools > Programmer > Arduino as ISP (Leonardo)
  • Tools > Board > Arduino/Genuino Uno
  • Tools > Port > select the port of the Leostick
  • Tools > Burn Bootloader

Let me know how it goes.

leofix.zip (459 Bytes)

I gave it a try and some further modifications were required due to changes in the IDE since PeterVH wrote the workaround. So use the attached file leofix-v2.zip instead of the previous leofix.zip but follow all the same instructions as my previous message.

leofix-v2.zip (511 Bytes)

I am getting more consistent errors, being the:-

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03

so far i have:_ 1. made sure the circuit is simple, no extras, 2. downloaded the leostick driver from fretronics webpage http://www.freetronics.com.au/pages/installing-the-usb-driver-file-for-windows#.V0brlZF96Uk 3. disconnected the leostick when uploading the isp sketch to it (with leostick chosen) 4. chosen arduino duemilanovel/Diecimila board and atmega328 5. chosen Arduino as ISP to confirm, A. mosi->miso and miso->mosi? B. no need to connect the isp header reset to the atmega328 reset?

I think maybe the error lies in the incorrect pin allocation in the arduinoisp program and/or bit/baud/processer rate!.

thanks All!

T6000: I am getting more consistent errors, being the:-

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03

Did you try following my instructions?

T6000: A. mosi->miso and miso->mosi?

No, mosi->mose, miso->miso, sck->sck, gnd->gnd, 5v->5v, 10->rst

T6000: B. no need to connect the isp header reset to the atmega328 reset?

You need to connect the reset on the ATmega328P to pin 10 on the leostick

T6000: I think maybe the error lies in the incorrect pin allocation in the arduinoisp program

It's your wiring that's wrong, not ArduinoISP.

T6000: and/or bit/baud/processer rate!.

No, I've already explained what the problem is and how you can make it work, you just need to correctly follow the wiring instructions and follow my directions and it will work fine. I've tested it and it works.

i just attempted to upload the blink sketch and got:- avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

then i turned on screen-abuse upload option and got:-

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM7 Using Programmer : arduino Overriding Baud Rate : 57600 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail :

Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino Description : Arduino Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

avrdude done. Thank you.

yes i followed your instructions, played with it a little, got nowhere, the wiring was right, so if i connect the reset to pin 10 i get :-

avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request.

compared to:-

avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

also it says the oscillator is off, so that means it is using the internal one at 8khz?, is this the problem?

T6000: i just attempted to upload the blink sketch and got:- avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

then i turned on screen-abuse upload option and got:

That's definitely progress from the not in sync error.

T6000: if i connect the reset to pin 10 i get :-

avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request.

What did you have reset connected to before? When I don't have reset connected I get:

avrdude: Device signature = 0xffffff

T6000: also it says the oscillator is off, so that means it is using the internal one at 8khz?, is this the problem?

No, I don't think that's an issue. Mine says the same thing with a Leonardo connected to an Uno during a successful Upload Using Programmer with the leofix-v2 workaround.

T6000: avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

I get that error when the grounds aren't connected. Double check your wiring.

I believe the arduino is bricked, and I am working on it!