Society of Robots - Robot Forum

Software => Software => Topic started by: Admin on July 05, 2008, 08:35:36 PM

Title: how to change AVR fuse bits without a hardware programmer?
Post by: Admin 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 . . .
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: garriwilson 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
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: izua 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.
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: bens 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
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: Admin on July 06, 2008, 07:37:51 AM
Well, the watch dog timer can be changed in software, so there was hope ::)
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: airman00 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?
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: izua 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?
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: Admin 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 . . .
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: vidam 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.

Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: garriwilson 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  :-[
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: airman00 on July 06, 2008, 02:31:55 PM
uchhh admin!!!

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

cmon man!
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: garriwilson on July 06, 2008, 02:34:18 PM
It's 35 bucks for a good one..
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: dunk 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.
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: Admin 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
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: vidam 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... ::)
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: airman00 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  :)
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: vidam 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.
Title: Re: how to change AVR fuse bits without a hardware programmer?
Post by: Admin 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