Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

USBtinyISP and ATmegat328p fuse problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

USBtinyISP and ATmegat328p fuse problem

by CaptainApathy on Fri Apr 22, 2011 12:46 am

Hey people, i'm Having a bit of trouble with a 328p that I cant seem to figure out. Maybe somebody can give me some insight.

Here's the scoop, I made myself an all-in-one programmer based off of the USBtinyISP (a tiny2313 loaded with the adafruit v1.04 firmware and a ZIF socket on the board for the ATmegaxx8 series), but i cant get the efuse to write correctly (lfuse & hfuse work fine) no matter what I try to set it to, it fails to write and verifies it as 0x04. I tried it on both my programmer and a Sparkfun Pocket Programmer on 3 different 328s, same thing on all.

Here is a dump of my avrdude window:

Code: Select all | TOGGLE FULL SIZE
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Dan>AVRDUDE -c usbtiny -p m328p -U lfuse:w:0xE2:m -U hfuse:w:0xD9:m -U
efuse:w:0xFC:m

AVRDUDE: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

AVRDUDE: Device signature = 0x1e950f
AVRDUDE: reading input file "0xE2"
AVRDUDE: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

AVRDUDE: 1 bytes of lfuse written
AVRDUDE: verifying lfuse memory against 0xE2:
AVRDUDE: load data lfuse data from input file 0xE2:
AVRDUDE: input file 0xE2 contains 1 bytes
AVRDUDE: reading on-chip lfuse data:

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

AVRDUDE: verifying ...
AVRDUDE: 1 bytes of lfuse verified
AVRDUDE: reading input file "0xD9"
AVRDUDE: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

AVRDUDE: 1 bytes of hfuse written
AVRDUDE: verifying hfuse memory against 0xD9:
AVRDUDE: load data hfuse data from input file 0xD9:
AVRDUDE: input file 0xD9 contains 1 bytes
AVRDUDE: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

AVRDUDE: verifying ...
AVRDUDE: 1 bytes of hfuse verified
AVRDUDE: reading input file "0xFC"
AVRDUDE: writing efuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.11s

AVRDUDE: 1 bytes of efuse written
AVRDUDE: verifying efuse memory against 0xFC:
AVRDUDE: load data efuse data from input file 0xFC:
AVRDUDE: input file 0xFC contains 1 bytes
AVRDUDE: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

AVRDUDE: verifying ...
AVRDUDE: verification error, first mismatch at byte 0x0000
         0xfc != 0x04
AVRDUDE: verification error; content mismatch

AVRDUDE: safemode: efuse changed! Was fc, and is now 4
Would you like this fuse to be changed back? [y/n]


Pressing 'y' at "safemode: efuse changed! Was fc, and is now 4
Would you like this fuse to be changed back? [y/n]" does nothing but freeze the read/write light on my programmer(s) on.

Any ideas?
Anyone else having problems with this combination?

Suggestions Welcome
CaptainApathy
 
Posts: 2
Joined: Fri Apr 22, 2011 12:21 am

Re: USBtinyISP and ATmegat328p fuse problem

by oPossum on Fri Apr 22, 2011 1:09 am

Bits 3 to 7 of efuse will always read 0 - they are not used.

So 0xFC (1111 1100) is the same as 0x04 (0000 0100)
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: USBtinyISP and ATmegat328p fuse problem

by CaptainApathy on Fri Apr 22, 2011 1:34 am

Alright, good to know. I'm new at this (moving up from an arduino, first time goofing with fuses), please excuse any future stupid questions.
Perhaps the guy that wrote This should bitmask it so it always returns 00000xxx

Thanks for the help.
CaptainApathy
 
Posts: 2
Joined: Fri Apr 22, 2011 12:21 am

Please be positive and constructive with your questions and comments.