Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems with the fusebits (atmega8)

Status
Not open for further replies.

orsa99

Newbie level 6
Newbie level 6
Joined
May 31, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,377
I use this ptrogrammer:

https://diy4fun.blogspot.it/2009/01/simple-serial-programmer-for-avr.html


I wrote an atmega8 without problems. When i change the fuse bits for an ext. RC Osc. 12 mhz (ckse0,1,2, ckopt, sut0 it's correct!), after i have connected the RC.osc 12 mhz with capacitors, but if i want reprogrammed the micro ponyprog not read and write anywhere, Why?
 

What - exactly - do you mean by the words "ext. RC Osc 12mhz" ??
Do you mean Ext Crystal osc, or what ?

If your clocking is not working properly, then the programmer won't work anymore.
 

Use this calculator for the fuses
https://www.engbedded.com/fusecalc

- - - Updated - - -

If you have used the wrong fuses for the clock source then all you need is a square wave clock generator connected to xtal1 (unless you have disabled reset or ISP)

Refer to http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325
 

I used in the first time an external crystal to 12 mhz and https://www.engbedded.com/fusecalc for the setting, i selected ext. RC Osc. 12 mhz . If i want to change the fusebits of the atmega8 for other use, the connection with the square generator is the only way?
There is no other way?
 

I used in the first time an external crystal to 12 mhz and https://www.engbedded.com/fusecalc for the setting, i selected ext. RC Osc. 12 mhz . If i want to change the fusebits of the atmega8 for other use, the connection with the square generator is the only way?
There is no other way?

Now this is even more confusing.....

What are you trying to do ? What IS your ciruit setup for ?!?!?
Is it external RC, external crystal, external clock or what ??

You need to be careful what you have setup in the circuit matchs what your fuse settings are. Since you have already programmed it (or so you say) for external RC, then you MUST chose only the RC method to go any further.

Once you can ISP communicate, then you can change the fuses again - but make sure you make corresoponding changes in your circuit too before trying anything further.
 

This is not external RC (Resistor/Capacitor), this is a crystal.

You should select external crystal/resonator high frequency 16CK +64ms
 

Ok, i have committed a folly :oops: i will buy a new micro

thanks at all for the answers!
 

When you program the wrong fuse that doesn't do any damage, you only need an external clock source to recover it

Read https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325

- - - Updated - - -

Actually if you have programmed external RC you won't even need that, you one need a capacitor and a resistor to form the RC.
Read the datasheet that explains what values to use

- - - Updated - - -

For example use 100pf and 330 ohm to get 10MHz RC

Connect it like

Snap2.gif
 

The atmega8 datasheet says :

"Problem Fix / Workaround
Use external capacitors in the range of 20pF - 36pF on XTAL1/TOSC1 and XTAL2/TOSC2.
This will be fixed in ATmega8 Rev. G where the CKOPT Fuse will control internal capacitors
also when internal RC Oscillator is selected as main clock source. For ATmega8 Rev. G,
CKOPT = 0 (programmed) will enable the internal capacitors on XTAL1 and XTAL2. Customers
who want compatibility between Rev. G and older revisions, must ensure that
CKOPT is unprogrammed (CKOPT = 1)"


And stop. How do I calculate the values​​?

Best regards
 

the equation for internal RC is given in the clock section of the datasheet.

For crystal turn off the internal capacitor and use a couple of 15 or 22 pf capacitors
 

Today is Sunday, tomorrow i will buy the capacitor 100pf and resitor 330 ohm....

I'm curious.....what's the configuration default (fuse bits) of the atmega8 just made from Atmel?
 

There are many alternative values you can use for the RC.
Do you have any capacitors 22p or higher ?

- - - Updated - - -

You know even if the fuse is set for RC a simple clock source connected to XTAL1 pin will solve the problem.
Can you make any of the suggested clock sources described in the AVRfreaks link I have provided?
Maybe you have another AVR, that can be used as well.
 

Do you have any resistor in the range of 1.5K (or you can combine two)

I have available also:

2 capacitor 100nf

2 resistor 4,7 kohm
2 " 10 kohm
1 " 15 kohm
1 " 33 kohm
1 " 100 kohm
4 " 150 kohm
 

If you use in parallel 4k7 and 4k7 and 10k you can get 1K9 and with the 22pf cap it will give 8MHz
If you setting is for external RC this should work and you will be able to fix the fuses, if not you 'll need an external clock source
 

alexan_e, THANKS! :grin: I used the capacitor 100pf and resitor 330 ohm and atmega8 is unlocked!

Thanks for all!

Best regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top