Atmega8A-AU & Atmega328P-AU Optiboot Bootloading Help !!!

Hi folks and good day to you all !

i'm back with yet more hair-raising help !!!

Ive really tried and failed so much on this already and after 3 weeks of trying out bootloader sketches for my two SMD atmega chips i keep failing miserably to get the Arduino NG bootloader onto the Atmega8 and UNO on the Atmega328 (unless we can get UNO on both then that will be much easier lol !)

But please could anyone point me out to working files for getting my two SMD chips bootloaded please please ?!?

Ive an SMD TQFP 32 to DIL adapter and i have a load of RBBB's configured as:

one for Arduino as ISP

one for Optiboot for Atmega328 UNO (DIP Package)

one for Optiboot for Atmega328 Duemilanove (DIP Package)

But i have gone and bought 10 Atmega8A-AU chips for small projects and wish to bootload them before soldering them and the same with the Atmega328P-AU chips !!

Please could anyone kindly help as im totally exhausted after download after download and a great many days of failed attempts, on my last hope here lol !

An even greater great many thanks in advance for help !!

kindest regards,

Anil !

The bootloader shouldn't need to change for different package types, but programming an SMT chip "before soldering" can be pretty challenging. Which bootloaders have you tried, and how are you trying to burn them?

Hi westfw !

OMG, the creator of Optiboot ! your work is LEGENDARY !!

i tried hooking up the Atmega8A-AU to an Arduino As ISP setup and simply selected board "Arduino NG or older w/ATmega8", selected the correct com port & Arduino As ISP in the programmer section, then when hit tools > Burn Bootloader i got:

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

Then tried one of your Optiboot loaders but im such a newbie for burning bootloaders im not entirely sure of what im doing, as long as ive got instructions saying to connect this pin to that pin and then hit the button, then im fine lol !

i found one of your optiboot bootloaders from here:

downloaded the files from github and slammed them into the libraries folder in my Arduino IDE (using 1.0.2 version), uploaded the sketch to an RBBB Arduino UNO Clone and hooked up the wires as directed to the SMD Atmega8A, powered it through USB Adapter and opened up the serial monitor to see what was going on and i hit the reset button, a few times, one after the other, not all at once, lol - just to see if i had the same error code come up but the error code changed each time and now im lost lol !

Error code was:

OptiLoader Bootstrap programmer.
2011 by Bill Westfield (WestfW)

Target power on! ...
Starting Program Mode - Failed, result = 0x7860

Target power OFF!

Type 'G' or hit RESET for next chip

second time i pressed reset:

OptiLoader Bootstrap programmer.
2011 by Bill Westfield (WestfW)

Target power on! ...
Starting Program Mode - Failed, result = 0x7070

Target power OFF!

Type 'G' or hit RESET for next chip

well i thought check a third time;

OptiLoader Bootstrap programmer.
2011 by Bill Westfield (WestfW)

Target power on! ...
Starting Program Mode - Failed, result = 0x7060

Target power OFF!

Type 'G' or hit RESET for next chip

so then tried as many files online through google searches that contained the words Atmega8A-AU + bootloader + Optiboot and i think i was really close on one of them where the signateure was expecting the DIP version of Atmega8A but now cant find that file and ive since deleted it from my computer, turned myself about a few times, sat in the corner, cried a bit and then thought about asking (begging!) for help lol !

Ive burned away a good bunch of Atmega328P-PU MCU's in PDIP flavor but cant seem to find an easy way of bootloading the SMT Atmega8A-AU sitting in the TQFP socket !

this is where i got the socket from: (just so you can see what sort of socket im using!)

http://www.ebay.co.uk/itm/220896147182?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

thank you so very very much for trying to help me with this, i can surely tell you that i greatly appreciate any light you can shed on this subject !

also there is someone selling Atmega8A-AU chips here:

http://cgi.ebay.com.au/ws/eBayISAPI.dll?ViewItem&item=121022928704&fromMakeTrack=true&ssPageName=VIP:watchlink:top:en

with the Arduino UNO Optiboot Bootloader pre-loaded, this would be perfect for me too but cant find any reference to how its done !

i already have 10 blank virgin Atmega8A-AU chips & 10 of Atmega328P-AU chips to bootload lol !

What would be the best way to mass-bootload them brfore-soldering ?!?

the creator of Optiboot

No, that was Peter Knight (aka Cathedrow.) I've just been maintaining and enhancing it for the last couple of years.

Your results sound like the pins are not connected properly from the ArduinoISP board to the 8A chip. It particularly looks like the SPI data "from" the 8A might be "floating" (thus the relatively random repsonse codes.)
Have you checked the pins? The SMT version has different pins for the ISP than the DIP (14-17 + 29 instead of 16-19 + 1), and there's the added complication that your adapter might move pins to some non-obvious location...

Let's stick with Optiloader; I trust its messages a bit more...

Oops ! Yaa apologies there for the slip up, just been seeing your attribution everywhere and didnt read properly lol ! Mighty-fine work on everything all the same !

Yaa ive got the atmel datasheet open and i think ive got the pins sussed out right in regards to the adapter, any other way ive wired it up yield no results except the way ive got it now, but im now not sure about something, im looking at the datasheet, when you said that to look for pins 14 to 17 +29, yup im with you there but im afriad i havent connected up pin 14 to anything ??? what does this connect to ?

on Atmega8 TO RBBB (with Optiboot Sketch)

14 = SS ?
15 = MOSI Pin 11
16 = MISO Pin 12
17 = SCK Pin 13
29 = RESET Pin 10

So could this be why my setup is failing ? because i havent connected up pin 14 on the Atmega8A ?!?

No, that should be OK. I miscounted signals :frowning: (The SS is used by SPI, but not by ISP programming.) That leaves me without any ideas :frowning:
Do you have all the VCC and GND pins connected? Crystal, bypass caps, etc? Sometimes different packages can be more sensitive to such packaging...

well ima just checking the pinouts from the manufacturer of the adapter i have, just to rule out the possibility ive got the pins completely wrong, will let you know how that goes lol !!

watch this space lol !!!

thanks so very very much for the help westfw !!!!

Okay so you were completely correct about the Adapter's pins not being as straight forwardly placed as i found pin-1 and its not where pin 1 is supposed to be on the DIP pin headers as the picture below shows...

So the supplier is un-helpful and his supplier asked the manufacturer for a pin layout and theres going to be no help from there but they said to check the pins with a digital multimeter (DMM) to see what they are... ok... so does anyone know how to do this and how on earth would i be able to find out what pin is connected to each pin on the TQPF chip inside the adapter ?

Or if anyone could kindly point me to anywhere saying what readings i am looking for from the DMM ? basically is this even possible to determine what each pin is for ?

many thanks in advance

Okay so i think ive sussed out the pins and now get this message so i think that ive got the pins correctly established and all i need is the right modification of the Atmega8A-AU device signature, please please help westfw !!

heres what i get now on compiling the optiboot sketch:

c:/users/mini power house 1.0/desktop/arduino-1.0/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: optiLoader.cpp.elf section .text will not fit in region text
c:/users/mini power house 1.0/desktop/arduino-1.0/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: region text overflowed by 4182 bytes

a yelp for help lol !!!

Optiloader itself runs on your existing arduino, which needs to have at least an ATmega168, since the sketch is 13k long (because it contains copies of three different optiboot_*.hex files, including the one for ATmega8.)