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.

[SOLVED] Atmega8 Programming Configuration and security bits

Status
Not open for further replies.

tushki7

Full Member level 4
Joined
Jul 6, 2010
Messages
232
Helped
50
Reputation
100
Reaction score
47
Trophy points
1,318
Location
india
Activity points
2,789
Hello,
I am new to avr's.. i want to program configuration and security bits for atmega8(external crystal 8 Mhz) and i want to reprogram its flash, so i don't want to lock it..
Here is image of settings which i used earlier to Program one of my atmega8, but now it is not working i cant read or write or even erase it : :cry:
atmega8.png

So please help me to set correct settings as i don't want to waste my other atmega8. I am using pony prog programmer.

Thank you in advance.
 

Check this thread
https://www.edaboard.com/threads/217227/

When you program the lock bits then you are not able to program or read the mcu until you erase it, this is intended to protect the content of the mcu, as soon ad you do a full erase you can rewrite the flash memory.

Your setting in the picture is for external RC and it is wrong for external crystal, you have to use an external RC to make it work again,
for external crystal you need to uncheck all cksel bits (which sets them to 1=unprogrammed).
 
  • Like
Reactions: tushki7

    tushki7

    Points: 2
    Helpful Answer Positive Rating
Check this thread
https://www.edaboard.com/threads/217227/


Your setting in the picture is for external RC and it is wrong for external crystal, you have to use an external RC to make it work again,
for external crystal you need to uncheck all cksel bits (which sets them to 1=unprogrammed).

Thanks,
You are right(I was so careful while programming this, But did the same mistake mostly all beginners do :-D)..Can you provide me the circuit(external RC OSC for 8mhz) ?
 

I have never used such a clock source but it is shown in page 28-29 in the mega8 datasheet
www.atmel.com/atmel/acrobat/doc2486.pdf

The setting you have used is for 8-12 MHz

f = 1/(3RC)

values like 33pF and 1000 ohm give a frequency of 10MHz
 
  • Like
Reactions: tushki7

    tushki7

    Points: 2
    Helpful Answer Positive Rating
Thank you
tpetar i already downloaded that, but i think problem is i am using crystal osc instead of rc osc..
i will get back to you guyz.
thanks a ton.

---------- Post added at 19:39 ---------- Previous post was at 18:53 ----------

It is working now, i made a RC oscillator using c = 33pf and R = 1000ohm(as said by alexan_e) :)

What should be the configuration and security bits, if i want to use 8MHz external crystal??
 

I wrote it in post #2

for external crystal you need to uncheck all cksel bits (which sets them to 1=unprogrammed).

CKSEL3=unchecked
CKSEL2=unchecked
CKSEL1=unchecked
CKSEL0=unchecked
 
  • Like
Reactions: tushki7

    tushki7

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top