Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: benji on April 11, 2008, 10:25:39 AM

Title: Atmega8L not detected
Post by: benji on April 11, 2008, 10:25:39 AM
im using ponyprog to download my hex files
i had this atmega8L connected to my serial port and i did download a hex file into it and its done fine.
then i got busy with somthing.
(i kept the thing connected to my serial port for about 5 minutes)
then i changed some fuses and while trying to write em ponyprog said (device unknown)
although i didnt disconnect anything and the first operation was done succefull...
i have tried a lot with it but ,,,nada.
any idea what happened?

bytheway the fuses i attempted to change was (CKOPT ,CKSEL3..0 , SUT1 ,SUT0)
so all are configuration fuses and not security ones,,,,
Title: Re: Atmega8L not detected
Post by: superchiku on April 11, 2008, 10:55:58 AM
those fuses are for an external oscillator so i guess u must have messed up the fuses by setting for an external crystal, try connecting the crystal and see , well another solution may be that ur atmega8l has blown up
Title: Re: Atmega8L not detected
Post by: benji on April 11, 2008, 01:52:43 PM
i know i did change these fuses , but would changing these ones cause the micro to blow up??????
why would it be blown up?

actually i got another one and it worked,,so pretty much the first one is blown up,,i just want to know why
Title: Re: Atmega8L not detected
Post by: superchiku on April 11, 2008, 02:04:08 PM
just dont know why but this happens same thing happened to my atmega16 it worked well, i changed the fuses , it got blown up as simple as that
Title: Re: Atmega8L not detected
Post by: benji on April 11, 2008, 02:07:53 PM
thats some interesting information about the atmegas
Title: Re: Atmega8L not detected
Post by: Ro-Bot-X on April 11, 2008, 02:31:05 PM
I'm not sure they are blown up. For instance avrdude does not recognize my atmega8 anymore, it says wrong signature. I have heard that sometimes when programming fuses, if not enough voltage is received, the fuses get corrupted. I believe this is the case with mine, since I can upload hex files using uisp (which does not check for signature, it asumes it's the right chip). I can modify the low and high fuses but not the extended fuses and can't get good signature. I was told that only a high voltage programming would make it work properly again. So, my advice is use uisp to upload hex files (use the verify switch, if you get errors, then the chip is dead). You can also check the fuses with it.
Sample batch files:
Code: [Select]
uisp -dprog=stk200 -dpart=ATmega8 -dlpt=0x378 --rd_fuses

uisp -dprog=stk200 -dpart=ATmega8 -dlpt=0x378 --erase --upload --verify if=Blink.hex
Title: Re: Atmega8L not detected
Post by: superchiku on April 11, 2008, 02:42:54 PM
well thats wat exactly happened device signature invalid oxffff thats the error i get so u think thats the main problem?
Title: Re: Atmega8L not detected
Post by: benji on April 11, 2008, 02:43:52 PM
well does it have the availablility to reprogram the fuses?

i get (device missed or unknown)
Title: Re: Atmega8L not detected
Post by: Ro-Bot-X on April 11, 2008, 02:49:57 PM
I can reprogram the low and high fuses, but I need to calculate the value in hexa (I hate hexa...). This may be your case too! But attention, you may need to use a crystal if you didn't use one before, the fuses may be set so that you need one.
Title: Re: Atmega8L not detected
Post by: benji on April 11, 2008, 03:03:56 PM
well actually i love hexa,, ;D

i always use an external crystal,,dunno why, maybe cuz i have many.... ;D

i know that in the atmegas there is a calibrated internal oscilator that can provide some freqs but i never used it before

is it better than an external crystan in term of performance?
Title: Re: Atmega8L not detected
Post by: Ro-Bot-X on April 12, 2008, 12:29:35 AM
i know that in the atmegas there is a calibrated internal oscilator that can provide some freqs but i never used it before

is it better than an external crystan in term of performance?

Nothing beats a crystal's performance. Not even the ceramic resonator. The order of performance is: crystal, ceramic resonator, internal oscilator.
Title: Re: Atmega8L not detected
Post by: Admin on April 20, 2008, 02:38:45 PM
If you program the AVR to use an external clock, but the external clock (like a crystal) isn't there, then the AVR will stop working.

You'd either have to add a crystal, or emulate the clock using a function generator.
Title: Re: Atmega8L not detected
Post by: benji on April 20, 2008, 03:13:29 PM
the problem is that the programmer doesnt recognize it anymore,,
Title: Re: Atmega8L not detected
Post by: Admin on April 26, 2008, 06:31:34 PM
Quote
the problem is that the programmer doesnt recognize it anymore
I know from experience that a programmer won't recognize it if the clock is misconfigured :P
Title: Re: Atmega8L not detected
Post by: benji on April 27, 2008, 09:17:11 AM
so programmer cant recognize it,cant recognize fuses either,,,so how in the world can i change settings back???
Title: Re: Atmega8L not detected
Post by: superchiku on April 27, 2008, 10:26:50 AM
hmm.. only thing you can do is guess what type of clock you programmed your controller for and attach it to the clock terminals and then try programming it, it will work
Title: Re: Atmega8L not detected
Post by: benji on April 28, 2008, 10:46:21 AM
i dont think the programmer is made to operate with other than 4mhz crystal
Title: Re: Atmega8L not detected
Post by: superchiku on May 01, 2008, 10:33:50 PM
we got a problem then , try to buy a new one or make one yourself..
Title: Re: Atmega8L not detected
Post by: benji on May 02, 2008, 02:35:37 AM
Quote
we got a problem then , try to buy a new one or make one yourself..

i think you should use a 4mhz crystal in order to enter the programmng mode
though not pretty sure

any schematics for an avr programmer that doesnt use the 4mhz osc ?
Title: Re: Atmega8L not detected
Post by: superchiku on May 02, 2008, 04:57:40 AM
i have made this self made programmer
for avr which will practically cost u $1
Title: Re: Atmega8L not detected
Post by: Steel_monkey on May 02, 2008, 06:49:02 AM
And also 20$ for LPT or COM - port card for new computer  ;D
Title: Re: Atmega8L not detected
Post by: superchiku on May 02, 2008, 07:40:23 AM
omg that should be present ,that is not counted
Title: Re: Atmega8L not detected
Post by: TrickyNekro on May 02, 2008, 09:18:38 AM
Quote
the problem is that the programmer doesnt recognize it anymore
I know from experience that a programmer won't recognize it if the clock is misconfigured :P

To add to what admin said... this also happens to my STK if I misconfuse the fuse bits...
for example if I use an external target board it's very possible (for me) to confuse the the configuration between the
external clock and external crystal...
Usually if not always I use crystals... but if I choose clock then the chip won't work unless I get it a certain clock freq...

Of course atmel has predicted that for fools like me and you can get such clock signal over the STK...
and finally unlock the chip...


So usually it's this... try get the atmega some clock pulses and see what happens...
if the atmega is still down... I would suggest high voltage parallel programming...
but for this you need a development board like the STK500...


Lefteris
Title: Re: Atmega8L not detected
Post by: Steel_monkey on May 02, 2008, 04:44:41 PM
There are programming software able to supply clock from LPT STK-200 programmer http://www.ln.com.ua/~real/avreal/descr_e.html (http://www.ln.com.ua/~real/avreal/descr_e.html) . For example, I am using atmega 8 with 12 MHz crystal, and it could not be recognised without external clock while being programmed. Ponyprog fails to detect it, but AVreal can. Bad news for handless : it is for LPT and it hand- made. However, it works fine ( under XP and 98, don't know about monster-Vista).