Schematic finally finished - A few questions.....

konguk:
Will this circuit work?

When this circuit is built I should be able to inject the XTAL pin on my Atmeg8 with the output of this circuit which will then allow me to reset the fuse bytes. Am i correct so far?

Greetings konguk,

Yes! and Yes!

I’d make three suggestions: Firstly, the unused gates should

be tied-off (to prevent them from oscillating or latching up

in a way that may damage the IC).

Secondly, with five unused inverter gates for free (in the

single package) you can use one as a buffer for the output

signal.

Also, add a supply by-pass capacitor to pins 14 and 7, as

close as practical to pin 7. Any small value ceramic (10 to

100nF) will work. Most of us have candidates in the "junk

pile" or salvage from almost any junk computer boards

on hand.

Unused gate problems can be fixed as follows:

(1) Connect pin 11 to pin 12 and take the signal output

from pin 10.

(2) Connect pin 1 to 14 (+5V), connect pins 2 and 3, and

connect pins 4 and 5 and finally, pins 6 and 9. This step ties

off the four unused gated from possible oscillation.

Comments Welcome!

inventore123:
To rescue the failed chips you only need a breadboard and a 2…8MHz crystal or better still an oscillator as described from bigglez. Connect the programmer, a power supply and restore the fuses to the default value that can be found in the datasheet.

konguk et al.,

FWIW, I “locked up” an AVR chip this week. Pilot error…

Had to put the dead AVR back in the STK500 board and

lash in the STK500 on board oscillator and use parallel

programming to rescue it.

(No AVR chips were hurt making this message).

Comments Welcome!

How’s about this? Or have I put the capacitor in the wrong place? What value of resistor do you reccommend?

[<LINK_TEXT text=“http://img86.imageshack.us/img86/3160/c … pk6.th.jpg”>http://img86.imageshack.us/img86/3160/circuit3pk6.th.jpg</LINK_TEXT>](ImageShack - Best place for all of your image hosting and image sharing needs)

Try this schematic it should work, but

  1. use 74hc04 instead of 74ac04

  2. the crystal is missing in the drawing, anyway it is in parallel with R1

  3. connect pin 7 to gnd and pin 14 to vcc (the cad doesn’t show these connections)

[<LINK_TEXT text=“http://img105.imageshack.us/img105/2300 … gn7.th.png”>http://img105.imageshack.us/img105/2300/90871134gn7.th.png</LINK_TEXT>

Just a question isn’t the cd4069 limited to 4Mhz? I don’t think it will work with a 12MHz crystal. Anyway the 74hc04 will surely work.](ImageShack - Best place for all of your image hosting and image sharing needs)

konguk:
How’s about this? Or have I put the capacitor in the wrong place? What value of resistor do you reccommend?

Greetings konguk,

A PIX is worth one-kilo words…

http://www.stonard.com/SFE/Oscillator.jpg

The resistor needs to be a very high value, and is not critical.

I doubt one meg or less would work, but 5 to 15 meg will.

The resistor biases the logic gate inverter as a linear amp

(like an op amp). A simple test is to place the resistor

around an inverter gate and measure the output voltage

with a DMM. If all is well the output will be one half the

supply (2.5V in your case). You can add the Xtal and

it’s loading caps to complete the oscillator.

Comments Welcome!

Wow, that schematic has confused me!

Is it essentially the same schematic i posted but layed out properly?

inventore123:
Try this schematic it should work, but

Just a question isn’t the cd4069 limited to 4Mhz? I don’t think it will work with a 12MHz crystal. Anyway the 74hc04 will surely work.

Greetings Inventore123,

A good question. I just built the circuit (in my last post)

on a perf board with a DIP CD4069UBE and it works!

http://www.stonard.com/SFE/DSCN7860_resize.JPG

The highest crystal in HC49US case that I have on hand

is 8.00MHz and it outputs 4V p-p on 5V DC.

http://www.stonard.com/SFE/DSCN7859_resize.JPG

http://www.stonard.com/SFE/DSCN7858_resize.JPG

From my “junk drawer” of salvaged crystals I found

an HC49 marked “67.105MHz” and it oscillated at

22.34MHz - obviously a third-overtone cut. I only

got 1V p-p from pin 10 (loaded with a 10pF scope

probe) so we’re taxing the '4069 at this frequency,

(plus I had the 'scope BW limited to 20MHz).

I think the OP has obtained a HC4069 IC, so the

'74xxx04 hints are a little confusing at this point.

Comments Welcome!

konguk:
Wow, that schematic has confused me!

Is it essentially the same schematic i posted but layed out properly?

Greetings konguk,

Take another look…

Hint: print a paper copy of each and use a pen

to trace and mark each wire (connection).

Comments Welcome!

bigglez: you’re keen doing that at 05:22 in the morning! (Presumably the clock’s right!)

Spotted it just after I posted that last message! Hopefully my components will arrive today so i can build the circuit and, fingers crossed, reset the fuse bytes on my Atmega!

Right, cd4069 has arrived today, and i’ve also been to the local electronics shop and picked up an 8.2 Mohms resistor and a 6.8mohms just in case :slight_smile:

I’ll build the circuit tonight and then try and rescue those atmegas!

Right after a bit of a break im back and trying to build the circuit from start again using breadboard. Im going to post some parts of it up to ensure im doing things right as im going along.

Can someone please check and see if this layout matches my shcematic?

Thanks

http://img262.imageshack.us/img262/4120/questionqo3.jpg

konguk:
Can someone please check and see if this layout matches my shcematic?

Greetings konguk,

Your diode is backwards on the protoboard. The band

is always the cathode, and the pointy end of the symbol.

A zener is used backwards (reverse-biased), the pointy

end goes to the most positive voltage.

Comments Welcome!

Thought i’d ressurect this thread as it’s related! Didn’t end up getting anywhere with the boards, also failed miserably at reseting the fuse bytes.

I’m now about ready to try again but wanted to be a bit more prepared so am looking at buying a programmer that is capable of resetting the fuse bytes and rescuing a load of atmega8 chips, also want the ability to program different atmels in the future.

I was looking at an STK500 which looks good for the price, found this one at http://www.rapidonline.com/productinfo. … leno=77113

Would i be able to reset fuse bytes with this programmer and is it a good deal?

I am also looking to get my hands on a basic oscilloscope as it’s looking like an essential bit of kit! I don’t know too much about my requirements but thought something like http://cgi.ebay.co.uk/OSCILLOSCOPE_W0QQ … dZViewItem might be suitiable?

Hope someone can steer me in the right direction, thanks…

Greetings Konguk,

konguk:
I was looking at an STK500 which looks good for the price, found this one… Would i be able to reset fuse bytes with this programmer and is it a good deal?

The STK500 is fantastic! I started learning about the AVR

uC on one years ago, and use it to this day for programming

the odd chip or testing out a simple hardware prototype.

I don’t have the add-on cards (yet) as I only use the DIP

packaged AVRs with it. I can’t vouch for the price in the UK.

You will need a PC (to run AVR Studio software) with a

serial com port.

konguk:
I am also looking to get my hands on a basic oscilloscope as it’s looking like an essential bit of kit! I don’t know too much about my requirements but thought something like …might be suitiable?

I'm a big fan of Leader analogue scopes (I have an LBO518,

see PIX earlier in the thread). The one on eBay is a lesser

model but certainly a good starter 'scope. Good luck bidding!

Comments Welcome!

Thanks bigglez, I think i’ll go for an stk500 - It is payday after all :slight_smile:

Can you confirm that this will be able to reset fuse bytes?

Also looking at that oscilloscope it doesnt appear to come with any probes, do I need specific ones?

konguk:
Can you confirm that this will be able to reset fuse bytes?

Yes, and more! The board has a clock oscillator (for AVRs that are “stuck” on external clock),

and both parallel and serial programming options (AVR type dependent).

konguk:
Also looking at that oscilloscope it doesnt appear to come with any probes, do I need specific ones?

Probe are consummable (accidently broken or the

tips can wear out). There are generic replacement probes,

not much to them as far as type. The more useful

ones are switchable for 1X/10X and have a pulse

response adjustment to match a particular scope.

All modern probes have BNC connectors (as do

the scopes).

Happy Bidding and Comments Welcome!

Right, finally recieved my Atmel STK500 programmer, took a while to arrive but it was a bargain price at 50GBP

Managed to rescue my chips after I spent ages battling with the user manual!

I have set the fuses correctly now and managed to flash the Atmega8 with the firmware, after reading it back it looks the same but the end of the HEX file has lots of extra FFFFFFF’s! Is this just empty space on the Atmega?

Although my Atmega8 is now correctly flashed and has the correct fuse bytes, the circuit still doesnt work :frowning:

I have attatched a schematic (Which is correct) and my breadboard (Where the problem lies) and was wondering if anyone would be so kind as to give it a once over and see if I have made any obvious mistakes?

Thanks…

[<LINK_TEXT text=“http://img249.imageshack.us/img249/3347 … wx4.th.jpg”>http://img249.imageshack.us/img249/3347/bbfinalwx4.th.jpg</LINK_TEXT>](ImageShack - Best place for all of your image hosting and image sharing needs)

You should have a decoupling capacitor across the supply and ground pins.

Is the oscillator working?

Leon

Greetings konguk,

konguk:
I have set the fuses correctly now and managed to flash the Atmega8 with the firmware, after reading it back it looks the same but the end of the HEX file has lots of extra FFFFFFF’s! Is this just empty space on the Atmega?

Yes.

konguk:
I have attatched a schematic (Which is correct) and my breadboard (Where the problem lies) and was wondering if anyone would be so kind as to give it a once over and see if I have made any obvious mistakes?

(1) Move the 1K5 resistor from ground to the +5V rail

(2) The uC Reset (pin 1) should be tied to 5V (10K resistor)

(3) Add a decoupling cap across the Vcc and Gnd rails

(4) All resistors appear to 22k (or, is this just a graphics error?)

(5) Check that top and bottom rails on the protoboard are linked

Comments Welcome!