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.

Help for the avr atmega8

Status
Not open for further replies.

orsa99

Newbie level 6
Joined
May 31, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,377
Good morning at all.

I want built this:

http://www.cithraidt.de/joyadapter/index.html


I need to change the fusebits of the atmega8.

1) first i flash with hex files and only AFTER i change the fusebits?

2) When i have changed the fusebits (ext. rc. osc. to 12 mhz) , i can not do it anymore (reprogrammed)?

3) the setting with ponyprog is EXT. rc. osc. 8.0 mhz -12.0 mhz startup time 6 CK + 4ms (cksel =1000 SUT=11) :

spien
ckopt
cksel 0
cksel 1
cksel 2

It's correct?

Is it necessary to change sut too? In what way?


Giulio
 

You can change the fuse bits before of after programming the flash it doesn't matter.
Until you set the hardware clock to the same frequency as the frequency that was set in the compiler when the code was compiled everything will be executed faster or slower depending on the relation of the real and configured clock.

After programing the fuse bits you can reprogram the mcu , that's no problem as long as you don't set the fuse clock settings to a clock source that is not available.
For example if instead of crystal you set the fuses to external clock then the mcu will not operate with a crystal and you'll need to connect an external clock in order to correct the fuses or reprogram the chip.

You can leave the SUT to the default setting, it shouldn't be a problem..

Alex

---------- Post added at 19:17 ---------- Previous post was at 19:07 ----------

Refer to https://www.edaboard.com/threads/217227/ for the fuse setings.

Don't change the spien, you can disable programming through the ISP.
 

alexan_e, thanks for the answer, but today i have blocked the atmega8!

I have selected cksel3 and not cksel1,2,0 for one distraction and it is not go.

Looking for your site i did this :


Hi, I am new in this forum
last time my ATMEGA8 has locked, and so i search how to unlock my microcontroller.
And now, my ATMEGA8 has already unlock.

This is step by step how to unlock my ATMEGA:
1. Open ponyprog serial device programmer
2. Connect the ATMEGA8 to pc (parallel port)
3. Click security and configuration bit
4. fill using this number :
WDTON : 1
SPIEN : 0 (cannot be changed)
CKOPT : 1
EESAVE : 1
BOOTSZ1 : 0
BOOTSZ0 : 0
BOOTRST : 1
BODLEVEL : 1
BODEN : 1
SUT1 : 1
SUT0 : 0
CKSEL3 : 0
CKSEL2 : 0
CKSEL1 : 0
CKSEL0 : 1
5. (This is the inportant thing that must do)
touch XTAL1 (and also) XTAL2 using your finger
and at the same time click "write" ....
6. ATMEGA8 can write the program again.

note : ATMEGA8 pin must not connected to other excep VCC, gnd, reset,miso,mosi,sck pin.

I hope this can solve your problem

regards,

-Imam-


https://www.edaboard.com/threads/131804/


But not function with my atmega8.

There is another way? (i don't have an oscillator i have only a crystal).

thanks for all!

Giulio
 
Last edited:

I don't understand why so many people program the wrong clock fuses in AVR.

What are the settings you have applied?

CKSEK3 checked?
CKSEL0,1,2 unchecked?
 

Yes I did it (cksel3 checked, cksel0,1,2,3 unchecked)
 

This setting is for external RC oscillator so you have to make one.

You need a resistor and a capacitor, check the External RC Oscillator section in the datasheet.
 

I have selected with precision this :

Ext. Crystal resonator high freq.; startup-time: 16K CK +64MS;[cksel=1111 SUT=11]
CKOPT= unprogrammed

The atmega8 datasheet is here :

http://www.atmel.com/images/doc2486.pdf

What do I look?

thanks

Giulio
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top