Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Probs with ATMega 16 (after programming)

Probs with ATMega 16 (after programming)

2004-02-03 by Marcus Klein

Hi AVR-world!

I have problems programming an ATMega 16 device via ICSP on two
application boards I
designed (two different boards with different applications). The first
one works fine but as I finished
the second one today and put a blank ATMega in for programming, the
following occured:
Programming and verification were reported to be ok, but nothing happens
(althoug the XTal runs).
Ports are all low or High-Z (couldn't measure that in circuit). I closed
the programmer, reopened it and
read the complete MCU-Memory and E2PROM - all ok. Next I put the
controller on the second
application board and programmed (also with the same ICSP-Interface) the
suiting hex-file - cycle ok,
XTal runs - noting happens.

I've checked for short circuits, low voltages, proper RESET-line
handling and couldn't find any errors.
I Used PonyProg to flash the hex-files and a simple COM-Port to
MSIO/MOSI/SCK/RESET - interface
that I used for a longer time on different MCUs.

I tried out a second device, programmed it first on the second board -
nothing, reprogrammed it on the
running board - nothing. You can only write, erase and read the device
but it does not run anymore...

I didn't try to put a MCU on the first board for programming because of
the different port config.

For hell's sake - I tried the whole afternoon, without any flashing idea
or any hint or help. I hope there
is anybody out there who can help me in this case. Thanks a lot to all
who try...

I can't get rid of the feeling, that I killed the two MCUs someway - I
don't want to kill the next ones I have
to order tomorrow...

Hope for help

Marcus

Re: [AVR-Chat] Probs with ATMega 16 (after programming)

2004-02-03 by Ivan Vernot

Marcus,
I have no solution but a couple of suggestions - HTH
1.Take the MCU that does not run on Board 2 (the non working board) and
program it with the .hex file for Board 1 (the b board that does work!).
Plug the micro into Board 1 and this will prove whether micro is faulty.
2. Check the fuse bits (yes again ;-)) Check you BOD bits (you don't say
what the difference between Board 1 and Board 2 is. Are the both 5V VCC? Is
one 3V and the other 5V?)
3. Check your Rest line. If the Xtal runs - is the micro being held in
reset?
4. Take the non working code and strip everything except a bit toggle (or
LED blink) in the main loop and program the no working board with that -
check that the simple program is working. (you might not be setting up the
stack properly for example.)

Try these things and let us know how you get on. Good Luck.

Ivan Vernot


----- Original Message -----
Show quoted textHide quoted text
From: "Marcus Klein" <klein@unix-ag.org>
To: <AVR-Chat@yahoogroups.com>
Sent: Wednesday, February 04, 2004 3:52 AM
Subject: [AVR-Chat] Probs with ATMega 16 (after programming)


> Hi AVR-world!
>
> I have problems programming an ATMega 16 device via ICSP on two
> application boards I
> designed (two different boards with different applications). The first
> one works fine but as I finished
> the second one today and put a blank ATMega in for programming, the
> following occured:
> Programming and verification were reported to be ok, but nothing happens
> (althoug the XTal runs).
> Ports are all low or High-Z (couldn't measure that in circuit). I closed
> the programmer, reopened it and
> read the complete MCU-Memory and E2PROM - all ok. Next I put the
> controller on the second
> application board and programmed (also with the same ICSP-Interface) the
> suiting hex-file - cycle ok,
> XTal runs - noting happens.
>
> I've checked for short circuits, low voltages, proper RESET-line
> handling and couldn't find any errors.
> I Used PonyProg to flash the hex-files and a simple COM-Port to
> MSIO/MOSI/SCK/RESET - interface
> that I used for a longer time on different MCUs.
>
> I tried out a second device, programmed it first on the second board -
> nothing, reprogrammed it on the
> running board - nothing. You can only write, erase and read the device
> but it does not run anymore...
>
> I didn't try to put a MCU on the first board for programming because of
> the different port config.
>
> For hell's sake - I tried the whole afternoon, without any flashing idea
> or any hint or help. I hope there
> is anybody out there who can help me in this case. Thanks a lot to all
> who try...
>
> I can't get rid of the feeling, that I killed the two MCUs someway - I
> don't want to kill the next ones I have
> to order tomorrow...
>
> Hope for help
>
> Marcus
>
>
>
>
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AVR-Chat/
>
> To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>


Re: Probs with ATMega 16 (after programming)

2004-02-04 by Marcus Klein

Hi all!

--- In AVR-Chat@yahoogroups.com, "Ivan Vernot" <ivernot@o...> wrote:
> Marcus,
> I have no solution but a couple of suggestions - HTH
> 1.Take the MCU that does not run on Board 2 (the non working board) and
> program it with the .hex file for Board 1 (the b board that does work!).
> Plug the micro into Board 1 and this will prove whether micro is faulty.

I did so. After programming a micro on board 2 (non-wirking) it didn't work on any board 
further on...

> 2. Check the fuse bits (yes again ;-)) Check you BOD bits (you don't say
> what the difference between Board 1 and Board 2 is. Are the both 5V VCC? Is
> one 3V and the other 5V?)

Both 5V, only different frequency, port-config and so on.

All fuses leaved unprogrammed (blank box in PonProg). 
During test I don't need code protection or so and brown out is not enabled. 
I thought to leave CKSEL and CKOPT unprogrammed (8/16MHz Xtal) - that 
runs on the 16MHz board (1) quite well.


> 3. Check your Rest line. If the Xtal runs - is the micro being held in
> reset?

Don't think so. Pulled it low after programming by hand and shortened the
pull-up-resistor afterwards to ensure it goes as high as possible - nothing.
What makes me wonder is the running XTal and the fact that you can 
flash the device correctly - why the hell doesn't it start running ???

> 4. Take the non working code and strip everything except a bit toggle (or
> LED blink) in the main loop and program the no working board with that -
> check that the simple program is working. (you might not be setting up the
> stack properly for example.)

Done so. All ports out, all ports low, setting one defined port bit high. No ints, no 
nasty stuff - nothing.

> 
> Try these things and let us know how you get on. Good Luck.
> 

Well, I'll have to hurry to my desk now - time for work. I'll try once more,
but it seems to me that the program cycle on the faulty board has killed the micro... 
... want to know why...


Thanks'n CYa later

Marcus

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.