go_away

Author Topic: how to change AVR fuse bits without a hardware programmer?  (Read 12346 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
how to change AVR fuse bits without a hardware programmer?
« on: July 05, 2008, 08:35:36 PM »
A google search failed me, but I swear there is a way to change AVR fuse settings without a hardware programmer (just uploading code in with a bootloader).

Anyone know if its possible? Anyone got sample code? Specifically, airman00 wants to turn off the JTAG fuse . . .

Offline garriwilson

  • Supreme Robot
  • *****
  • Posts: 342
  • Helpful? 0
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #1 on: July 05, 2008, 08:41:23 PM »
ok in avr studio press tools --> program avr --> connect --> disconnected mode --> fuses tab

and it should be there i think

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #2 on: July 06, 2008, 03:45:55 AM »
As far as I know, only some fuses can be accessed, and only in read mode by software. Since you are using a bootloader, which is essentially software, I doubt (by my knowledge) this can be done. However, if this is possible, let me know. It would allow some cool things, like - using a button to restore good fuses, in case you brick your AVR.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 331
  • Helpful? 3
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #3 on: July 06, 2008, 03:54:43 AM »
ok in avr studio press tools --> program avr --> connect --> disconnected mode --> fuses tab

and it should be there i think

What would this accomplish?  How do you expect AVR Studio to be able to change the fuses of a device that it's not connected to?

I'm pretty sure you cannot set the fuses without an external programmer.  From the mega168 datasheet, section 26.6 (Entering the Boot Loader Program):

Note that the fuses cannot be changed by the MCU itself.

I don't know about other 8-bit AVRs, but since they share the same architecture I assume this would apply universally.  As izua has said, you can read the values of the fuse and lock bits software, though.

- Ben

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #4 on: July 06, 2008, 07:37:51 AM »
Well, the watch dog timer can be changed in software, so there was hope ::)

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #5 on: July 06, 2008, 08:11:29 AM »
crap

so what exactly can;t I use on the axon if I do not have the hardware programmer?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #6 on: July 06, 2008, 09:01:09 AM »
If you enable the watchdog override fuse, you try disabling the watchdog timer :P
If you don't have access to a hardware programmer, you can't change fuses. So you can't change JTAG port, clock, bootloader settings, and so on. It's not critical stuff if you don't really need it.

Is JTAG manually disabled on the axons?
« Last Edit: July 06, 2008, 09:01:41 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #7 on: July 06, 2008, 09:06:02 AM »
This ONLY applies to Axons that have already shipped, I fixed the rest:

Pins 4, 5, 6, and 7 will not work as ADC as long as the JTAG fuse is enabled. Since there are 16 ADC, if you don't plan to use more than 12 sensors it shouldnt be a problem for you.

And to avoid dual threads, here is a link to my original post:
http://www.societyofrobots.com/robotforum/index.php?topic=2822.msg36398#msg36398

Quote
Is JTAG manually disabled on the axons?

they are now! but not originally . . .

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #8 on: July 06, 2008, 09:54:59 AM »
Can I exchange mine for one that has the JTAG disabled? I haven't opened my package yet. And I don't want to fuss with this stuff.


Offline garriwilson

  • Supreme Robot
  • *****
  • Posts: 342
  • Helpful? 0
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #9 on: July 06, 2008, 10:37:01 AM »
ok in avr studio press tools --> program avr --> connect --> disconnected mode --> fuses tab

and it should be there i think

What would this accomplish?  How do you expect AVR Studio to be able to change the fuses of a device that it's not connected to?

oh my bad i thought a programmer was being used  :-[

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #10 on: July 06, 2008, 02:31:55 PM »
uchhh admin!!!

i needa have it switched! I dont have an AVR programmer

cmon man!
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline garriwilson

  • Supreme Robot
  • *****
  • Posts: 342
  • Helpful? 0
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #11 on: July 06, 2008, 02:34:18 PM »
It's 35 bucks for a good one..

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #12 on: July 06, 2008, 04:21:28 PM »
uchhh admin!!!

i needa have it switched! I dont have an AVR programmer

cmon man!
i'm curious what on earth you need more than 12 analogue inputs for?

dunk.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #13 on: July 08, 2008, 10:15:52 AM »
Quote
Can I exchange mine for one that has the JTAG disabled? I haven't opened my package yet. And I don't want to fuss with this stuff.
but . . . according to your other posts you own a programmer . . . its just a minute of effort don't be lazy :P
it'll take you much less time than it would take to ship it back too . . .


Quote
i'm curious what on earth you need more than 12 analogue inputs for?
examples . . .
a large biped that uses pots for joint position feed back control - a biped easily has 12 or more joints . . .

or . . .
a hexapod robot with 6 DOF IMU, a compass, 3 sharp IR, and a force sensor for each of 6 feet :P

8 ADC has never been enough for me . . . I often need like 10 or more for stuff

Quote
uchhh admin!!!

i needa have it switched! I dont have an AVR programmer
i'll send you an email now

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #14 on: July 08, 2008, 03:24:53 PM »
not being lazy...I thought you were going to test every Axon thoroughly before shipment. This finding last weekend means you didn't test which is what you stated you would do. So now who is the lazy one, heh... ::)
« Last Edit: July 08, 2008, 03:26:31 PM by vidam »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #15 on: July 08, 2008, 03:46:33 PM »
not being lazy...I thought you were going to test every Axon thoroughly before shipment. This finding last weekend means you didn't test which is what you stated you would do. So now who is the lazy one, heh... ::)

o snap !


anyways....
admin was kind enough to fix my messed up Axon for free  :)
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #16 on: July 08, 2008, 03:51:33 PM »
not being lazy...I thought you were going to test every Axon thoroughly before shipment. This finding last weekend means you didn't test which is what you stated you would do. So now who is the lazy one, heh... ::)

o snap !


anyways....
admin was kind enough to fix my messed up Axon for free  :)

Gee that was awful nice, and I know it is because you don't have a programmer.

At this time, I don't know what he tested if anything at all. I got a discount but didn't think that this means it wouldn't get tested.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: how to change AVR fuse bits without a hardware programmer?
« Reply #17 on: July 08, 2008, 09:37:37 PM »
Bugs are just something thats inherent in all new software - I could test for months and not find a hidden bug.

Fortunately with software bugs, they can be easily and quickly fixed once identified.

If anyone finds bug like activity in the Axon, just post it on the forum and/or send me a direct email on it. I'll get to squishing right away.

Hardware bugs on the other hand . . . it took me 6 expensive prototypes to eliminate all of them . . . thats why it says 'v1f' on your board and why I had all those delays :P

 


Get Your Ad Here

data_list