Aggervation with burning bootloader

I am trying to burn the stupid bootloader onto a mega 168, I have been using a PPC machintosh with debian on it, so the first chip I used avrdude on the command line (cause there is no IDE on PPC debian cause lib RX/TX is broken)

using the fuse settings for the 168 I programed the chip and got a "content mismatch error" and that ever so useless prompt "would you like to revert" if you hit yes it just sits there, in fact I left it running for 12 hours and it just sat there...

Ctrl + C to break out, and now the mega168 always comes back with a device mismatch error, though I have used this chip before and it was working fine, crap it was working fine before I used the fuse settings from boards.txt for the 168!

Sigh fine, grab my last 168 and drag out the windows laptop, hook it up to the arduino as an isp, use the ide to burn the bootloader EXACT SAME THING HAPPENS

I can still read both chips if i use the -F flag but the chip ID comes up as all zeros and the fuses all come up as 0x00

Did I just hose my last 2 168's? or what :stuck_out_tongue_closed_eyes:

Thanks

try -v -v -v -v this will give more info and if everywhere are just 0 I'm affraid you chips are destroyed same thing happened to me.

I will get a verbose output when I feel like I can go back to the bench without punching something

I have no idea how this could happen, my normal setup is always flasing though avrisp and avrdude, change fuses all the time, use the ones in the boards.txt and now I am totally screwed

... well not totally I just dont have time for more chips to snail mail their way here just to watch them hose themselves doing the same thing. As I already stated both these were working just peachy before

edit: a verbose output at this point wouldn't help at all, all it does is go "yikes, invalid chip id"

How is the target clocked? Crystal + caps? Resonator?

Moderator edit: Hang on. We're moving to Microcontrollers.

I have tried with and without a clock source both crystal and ceramic

when I first got the chips I set them to run on an external clock, they have been working fine until now

"boards.txt" essentially has three sets of fuse settings for the 168 processor...

Arduino Diecimila, Duemilanove, or Nano w/ ATmega168
Arduino Mini
Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
Arduino NG or older w/ ATmega168


low_fuses=0xff
high_fuses=0xdd
extended_fuses=0x00

LilyPad Arduino w/ ATmega168


low_fuses=0xe2
high_fuses=0xdd
extended_fuses=0x00

Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168


low_fuses=0xc6
high_fuses=0xdd
extended_fuses=0x00

Which set did you use?

I used ...

Arduino Diecimila, Duemilanove, or Nano w/ ATmega168
Arduino Mini
Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
Arduino NG or older w/ ATmega168
low_fuses=0xff
high_fuses=0xdd
extended_fuses=0x00

course if you go to the Burn 168 page it tells you differently in who knows what order

http://www.arduino.cc/playground/Learning/Burn168

ATmega168 Fuse Settings

Once set the fuses should read 0xF8, 0xDF and 0xFF

I did try after they were already zombies

side note: anyone know of a parallel programmer or fuse fixer that uses a 328 or 84? (keeping in mind my 328 is the only bootloaded chip I have atm)

I can still read both chips if i use the -F flag but the chip ID comes up as all zeros and the fuses all come up as 0x00

As far as I can tell, the zero ID is output when AVRDUDE is not able to communicate with the target.

Does this appear in the AVRDUDE ouput...
"avrdude: AVR device initialized and ready to accept instructions"

ayep!

check the output without the force flag it does not know, forcing in it can read fine but everything is 0x0...

output.txt (2.75 KB)

That was the output from using an Arduino as an ISP?

yes the arduino acting as programmer has a mega328p

What does this output...

avrdude -p m168 -c stk500 -b 19200 -P com1 -v

Man I cant win tonight, I moved my laptop a little so I could see the arduino better and the freaking power cable got snagged and yanked a wire loose (grumble gripe) so anyway I am back on the linux mac but just keep talking windows if that is easier

osgeld@Macintosh:~$ avrdude -p m168 -c stk500 -b 19200 -P /dev/ttyPZ0 -v

avrdude: Version 5.10, compiled on Jun 27 2010 at 00:40:48
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/osgeld/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyPZ0
         Using Programmer              : stk500
         Overriding Baud Rate          : 19200
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout

TBH I have never seen anything else out of STK500 linux or windows

Oh just for giggles I tossed an attiny85 onto the programmer and it works like a champ, which takes the majority of machine / arduino failure out

osgeld@Macintosh:~$ avrdude -p attiny85 -c avrisp -b 19200 -P /dev/ttyPZ0 -v

avrdude: Version 5.10, compiled on Jun 27 2010 at 00:40:48
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/osgeld/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyPZ0
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny85
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         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     6     4    0 no        512    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel AVR ISP
         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: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude: Device signature = 0x1e930b
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF

avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

With the last 168 test, how was the processor clocked? If you did not have a crystal or resonator connected, try that now.

it was connected but there is no activity, both clock pins rise to about 0.8v and stay

I can think of only three things left...

  1. Wiring. I doubt this is the problem. You got the wiring correct three times.

  2. Fuse settings. The settings you posted should work fine with an external clock but, if something was mistyped, you may have inadvertently written "bad" settings. I doubt this is the problem because, if I read your first post correctly, you would have had to mistype the fuse settings twice.

  3. Clock. You haven't provided much detail about the clock so this may be a good time to review... If you are using a crystal, did you use (roughly) 22 picofarad capacitors? Are you certain the crystal (or resonator) works / did you try a different one?

If the targets are externally clocked (and they should be), nearly any clock signal on XTAL1 will work for programming. I have a variation of Arduino ISP that provides a 1 MHz clock if you're interested.

Note that "external clock" and "external crystal" are two entirely different things.
LFUSE=FF should be "low power external crystal", which should be what you want.
I've had ATmega8-based clones with resonators that didn't work with "low power" fuses, but did work with the "full swing" setting. Google Code Archive - Long-term storage for Google Code Project Hosting.

yes I have tried crystals (w 22pf caps) and 2 resonators, all the same effect, I am going to try putting a clock source on it today

fuses I only typed it in once, the second time I did it from the windows version of the IDE

ok I hooked up a 10MHz 4 pin crystal oscillators output to XTAL 1 and It reads!

I am going to reset the fuses back to default and try the bootloader process again (using the IDE) and if it screws up again I will be sure to let everyone know

Thanks for your help