Author Topic: programming the ATMEGA32 - internal RC  (Read 3836 times)

0 Members and 1 Guest are viewing this topic.

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
programming the ATMEGA32 - internal RC
« on: June 27, 2007, 12:25:57 PM »
Hello to everyone...
I'm trying to use the external osclinator of my atmega32 cause not only if far faster and precise but also to finish my development board and be able to present it!!!
I'm using BASCOM AVR for programming and ponyprog to download (both most recent editions)
I'm runnong on 1MHz while I have a crystal of 16MHz...
Can anyone tell me by any mean possible how to unlock this fuse bits?!?!?


Warm Regards
Lefteris, Greece
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: programming the ATMEGA32 - internal RC
« Reply #1 on: June 27, 2007, 12:45:00 PM »
Read CAREFULLY:

http://www.scienceprog.com/programming-avr-fuse-bits-oscillator-settings/

"CAREFULLY" is emphasized because if you make an error you might get locked out of the fuse bit settings of your chip. Yep that IS bad.
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: programming the ATMEGA32 - internal RC
« Reply #2 on: June 27, 2007, 03:45:50 PM »
I think I've messed it up a little... The chip not responding BUT I have learned at least how to do this!!!
I had some spear attiny2313 and I messed up a little but i got them working....
Thanks for the respond!!!

It's a common fact that if you don't break you don't learn...

Also a comment that might be usefull for others...
If you want just to unlock the chip to it's best of capabilities just check SUT0 to your programmer (not quite sure but that's what I've done)
When changing fuse bits in ponyprog the first writing verification would fail... Uncheck the fuse bit back to the options and run again the downloading process, it should verify it and you are ready to go!!!

And last, that's a way to save your chip but don't know if always works!!! If the chip says no, you say yes... DO NOT ABORT the download, JUST IGNORE!!! I have just saved my ATtiny2313 that way!!!

I'm always talking about ponyprog

Thanks again for the answer...
Warm regards
Lefteris, Greece
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: programming the ATMEGA32 - internal RC
« Reply #3 on: June 27, 2007, 04:33:21 PM »
Also a comment that might be usefull for others...
If you want just to unlock the chip to it's best of capabilities just check SUT0 to your programmer (not quite sure but that's what I've done)

Check the section "Clock Sources" for your part's data sheet (ie ATmega8).

This section defines the possible values of SUT0 and SUT1. The settings of SUT0 .. SUT1 must match the characteristic of the oscillator that you are using for a specific speed, specially if you are using an external oscillator. If you are using the internal oscillator you are free to play with the values, of course do so always with caution.

Also this only affects start-up times and doesn't "speed-up" the actual processing of your MCU. There is no actual advantage in setting this.

Quote
When changing fuse bits in ponyprog the first writing verification would fail... Uncheck the fuse bit back to the options and run again the downloading process, it should verify it and you are ready to go!!!
Before programming the fuse bits make sure that you have setup the correct part! A failure in verifying/writing the fuse bits is a sign that either your programming speed is too high or you have an incorrect part setting. I have once tried to program the fuse bit of an ATmega168 when my programmer settings were for an ATmega169! This is a very simple way to destroy your MCU.


Quote
It's a common fact that if you don't break you don't learn...
Yep but I attribute this kind of learning to blindly doing something without reading/researching first. Or going over your current capabilities. Comprehend/understand something before acting. It'll lead to lesser frustrations, headaches and  broken things. Cheers!
« Last Edit: June 27, 2007, 04:34:13 PM by rgcustodio »
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: programming the ATMEGA32 - internal RC
« Reply #4 on: June 28, 2007, 12:10:44 AM »
Quote
Before programming the fuse bits make sure that you have setup the correct part! A failure in verifying/writing the fuse bits is a sign that either your programming speed is too high or you have an incorrect part setting. I have once tried to program the fuse bit of an ATmega168 when my programmer settings were for an ATmega169! This is a very simple way to destroy your MCU.

I've probably setted the programming speed too high, you're right... I have the minimun delay available check... But once a guy told me that this only concern my PC and how fast it is not the chip, anyways......

Quote
Yep but I attribute this kind of learning to blindly doing something without reading/researching first. Or going over your current capabilities. Comprehend/understand something before acting. It'll lead to lesser frustrations, headaches and  broken things. Cheers!

I can say I misunderstood things here a little due to lack of paying the needed attention :-\....
Well I also burned my first LCD but now I can modify them to extremes (costume characters, backlight mods, polarizer mods e.t.c.)!!!!


I only hope I can revive my ATMEGA.... desoldering 40 pins can be a great headache even the thought!!!!! :-[ :'( :'(

Anyway,
Thanks for your help a lot.... Alone may have done some time to find these....

Most Warm Regards,
Lefteris, Greece
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

 


Get Your Ad Here