[SOLVED] Nick Gammon's bootloader nearly working

... but not quite there

I have a home-brew stand alone UNO clone

I patched another UNO to connect

UNO clone

+5v to +5v
Gnd to Gnd
D10 to reset
D11 to D11
D12 to D12
D13 to D13

I'm running Atmega_Board_Programmer
at start up it reports:

Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0x62
HFuse = 0xD9
EFuse = 0xFF
Lock byte = 0xFF
Clock calibration = 0x62
Bootloader address = 0x7E00
Bootloader length = 512 bytes.

looks good :slight_smile:
I then type
U for Uno
G for Go

I get
Erasing chip ...
Writing bootloader ...
Committing page starting at 0x7E00
Committing page starting at 0x7E80
Committing page starting at 0x7F00
Committing page starting at 0x7F80
Written.

look good
but verify fails miserably
441 verification errors :frowning:

am I right to think the board must be working ok to get this far
crystal oscillating etc.?

any help advice would be most gratefully received :slight_smile:

You have the "divide clock by 8" fuse set. Whilst it should work anyway, I think that is the issue. Try making the low fuse 0xE2.

A simple way of doing that would be to find these lines in the sketch (the most recent version, anyway):

    // for Atmega8, fix up fuse to run faster, then write to device
    if (signatures [foundSig].timedWrites && lFuse != newlFuse)   <------ remove this line
      {
      Serial.println (F("Fixing fuse setting ..."));
      writeFuse (newlFuse, writeLowFuseByte);
      delay (1000);
      digitalWrite (RESET, HIGH); // latch fuse
      startProgramming ();
      delay (1000);
      }

Comment out the "if" line (so it does it anyway). Then it should fix up the low fuse byte, and then do the programming.

wow
absolutely brilliant!

you, sir, are a gentleman and no mistake :slight_smile:

now why would I have the divide clock by 8 fuse set?
brand new SMD chip straight out of the packet?!?

mmcp42:
wow
absolutely brilliant!

you, sir, are a gentleman and no mistake :slight_smile:

now why would I have the divide clock by 8 fuse set?
brand new SMD chip straight out of the packet?!?

Isn't that the factory default, internal 8 Mhz R/C clock and divide /8 set?

Lefty

retrolefty:

mmcp42:
wow
absolutely brilliant!

you, sir, are a gentleman and no mistake :slight_smile:

now why would I have the divide clock by 8 fuse set?
brand new SMD chip straight out of the packet?!?

Isn't that the factory default, internal 8 Mhz R/C clock and divide /8 set?

Lefty

have to say I have no idea
but the last one I tried worked fine
bizarre

anyway - all working now bunny[happy]++

retrolefty:
Isn't that the factory default, internal 8 Mhz R/C clock and divide /8 set?

Yes, I think so.

Yes, factory default is 8Mhz internal osc and Clock Div 8 to give 1Mhz.