Author Topic: Trying forever to get fuse settings and drivers.  (Read 10552 times)

canterbury

  • Newbie
  • *
  • Posts: 9
Trying forever to get fuse settings and drivers.
« on: May 15, 2016, 11:58:14 pm »
avrdude -c usbasp -p t85 -U flash:w:micronucleus-1.05.hex -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xfe:m
pause

canterbury

  • Newbie
  • *
  • Posts: 9
Re: Trying forever to get fuse settings and drivers.
« Reply #1 on: May 16, 2016, 05:05:37 am »
Addendum>>
For those that have signed on as complete newcomers, there is a fair learning curve.
I don't mind saying that at 50 yrs, my attrified brain is slightly challenged wading through AVRDude and Driver issues with Win7 64 bit. etc.
'But I might be on the cusp.
Maybe some kind soul will confirm one way or the another if this is the correct bat file to use a USBasp and then the fuse settings if you might confirm correctness.

 I might have a chance to get these Rev3 clones that arrived without a functional bootloader finally working to where I can finally address some of the example code via arduino 1.6.5.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Trying forever to get fuse settings and drivers.
« Reply #2 on: May 16, 2016, 10:51:32 pm »
Here are the fuse settings we use:

Low fuse: 0xe1
High fuse: 0x5d
Extended fuse: 0xfe

It is possible the clones are not stable or have bad components - it is also possible their fuses were set in a way that prevents you from changing them or the hex file.

Of course, we won't support them in any way - but I can confirm your fuse settings should work.

canterbury

  • Newbie
  • *
  • Posts: 9
Re: Trying forever to get fuse settings and drivers.
« Reply #3 on: May 17, 2016, 08:55:09 am »
Hi canterbury,

your avrdude command is correct, with a slight issue:

The ISP programmer clock must be less than 1/4 of the attiny clock. When the attiny is delivered from factory, it is running with 1 MHz clock, but avrdude is clocking too fast and does not even detect it.

The solution is to slow down avrdude by adding the parameter -b <waiting time>, for example -b 10

Ralf

Thank you Ralph I will try this, I just have  two more points regarding fuse and lock settings coming up next

earckens

  • Newbie
  • *
  • Posts: 26
Re: Trying forever to get fuse settings and drivers.
« Reply #4 on: January 18, 2017, 12:01:39 pm »
Here are the fuse settings we use:

Low fuse: 0xe1
High fuse: 0x5d
Extended fuse: 0xfe

It is possible the clones are not stable or have bad components - it is also possible their fuses were set in a way that prevents you from changing them or the hex file.

Of course, we won't support them in any way - but I can confirm your fuse settings should work.

Hi,

what would be the effect of using lfuse 62 and hfuse DF as far as frequency and its consequences? And efuse FF?

In effect using CKDIV8, and CKSEL0 instead of CKSEL1; and no BODLEVEL. And not using SELFPRGEN (efuse setting FF).

Erik


« Last Edit: January 18, 2017, 12:08:17 pm by earckens »

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Trying forever to get fuse settings and drivers.
« Reply #5 on: January 18, 2017, 04:41:13 pm »
The fuse settings of lfuse 0x62 hfuse 0xDF efuse 0xFF are the factory default settings for the Attiny85 MCUs. It sets it up so the default clock is the 8Mhz internal clock, with prescaling of 8, making the system clock speed 1Mhz. No low voltage (brownout) detection, does not allow the Attiny to reprogram itself, and leaves the external reset enabled.

The settings that the digispark uses (lfuse 0xE1 hfuse 0x5D efuse 0xFE) instead instructs the Attiny85 to use the PLL clock (nominally 16Mhz) with no default prescaling (so it really will be 16Mhz system clock). The brown-out detection is turned on (as recommended when using the PLL) and set to trigger at approximately 2.7v. The external reset is disabled (allowing use of the reset pin as an I/O). And self-programming is enabled.

The brown-out detector prevents the Attiny85 from getting stuck in an endless reboot loop if the supply voltage drops down below the trigger voltage - it keeps the Attiny85 in a reset state until the voltage rises sufficiently. Self-programming is how the micronucleus 'bootloader' is able to reprogram the Attiny85, and even update itself.
« Last Edit: January 18, 2017, 04:44:57 pm by PeterF »