uisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Uisp-dev] Fuse/Block R/W for ATmega103L


From: Shane B Eisenman
Subject: [Uisp-dev] Fuse/Block R/W for ATmega103L
Date: Mon, 28 Apr 2003 00:44:05 -0400 (EDT)

I am trying to read/write the fuse/lock bits of the atmega103L

I have tried uisp-20010211 with the following results when reading the
fuse segment:

fuse $00000: 0f ff ff ff

what is the format of this output? I am guessing the first byte is the
fuse byte, making (according to the data sheet):

(bit 0):SUT0=1
(bit 1):SUT1=1
(bit 3):EESAVE=1
(bit 5):SPIEN=0

Is this correct?

Now, I want to set the lock byte to:

(bit 1):LOCKBIT1=1
(bit 2):LOCKBIT2=1

That's easy - just chip erase. But say I wanted to set a bit to "0".  How
do I do that?  Are the lock bits also located in the fuse segment?

I was thinking it would be nice if these were labelled explicity, and lo
and behold, along came uisp-20020626. This version dumps (and allows
writing) the results, formatted nicely with labels:

Fuse Low Byte      = 0x0f
Fuse High Byte     = 0xff
Fuse Extended Byte = 0xff
Calibration Byte   = 0xff  --  Read Only
Lock Bits          = 0xff
    BLB12 -> 1
    BLB11 -> 1
    BLB02 -> 1
    BLB01 -> 1
      LB2 -> 1
      LB1 -> 1

Beautiful!!! Only problem is the ATmega103L doesn't have Fuse High Byte,
Fuse Extended Byte, Calibration bits, and has only 2 lock bits, not 6. The
additional 4 seem to apply to other controllers like the mega163 or the
mega128 that have their own bootloader. Is this correct?  Can the next
version only print out the labelled data relevant to the detected
controller? Just a suggestion :)

Finally, assuming for a moment that my interpretation of the dumped fuse
bits is correct, I noticed in the data sheet for the ATmega103L that bits
4,6 and 7 are Reserved bits and should be left unprogrammed ("1").  If
that is true, how come they are read back as "0".  I tried to program them
to "1" to no avail.  Are these bits masked out in the uisp display code or
is there something defective with my fuse bits? If they are masked in the
code, why are they masked?

Thank you for your response.

- Shane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]