How to check if a microcontroller is broken?

Gast #885333
Hi all,

I know it's a German forum so sorry for the English post. I'm in the 
learning period of German I can read it roughly but can't write.

Now I'm using atmega128 to do a project. Before the uC worked totally 
okay, however from this week it just stops working. I dont know what 
went wrong so I  used a simple method to check it, by which I attached a 
LED to the I/O port.

My circuit is truely simple, connect the PORTB.1 with a 470ohm resistor 
and the longer end of the LED, the shorter end of the LED was connected 
to the GND. I use 5V Vcc and JTAGICE.

my program is like this:

.INCLUDE "m128def.inc"


.CSEG
.ORG 0x00
  RJMP main

main:

  ldi r16, low(ramend)
  out spl, r16
  ldi r16, high(ramend)
  out sph, r16

repeat:

        ldi r16,0x01
  out ddrb,r16

  ldi r16,0x01
  out portb,r16

    jmp repeat



After all the uC didnt work any more, I was wondering if the 
microcontroller is broken. So I checked the voltage between Vcc and GND, 
and it is okay. So now I'm in no where. Could anyone tell me how to 
check if the microcontroller is broken? Dank!
Gast #885355
Another good method is to put one PORT into output mode (using the DDR), 
and then give it some pattern like 0b10101010. Then just measure with a 
voltmeter, if you can see this pattern on the used port.
Gast #885375
Thank Bernhard for the hint, I just did what u suggested, set the DDRB 
as 0xff, and PORTB as 0b10101010, and measure the voltage between each 
pin and GND, but I didnt see any pattern coming out, all the voltages 
stay constant which arounds zero.
Gast #885400
hi, otto, the fuse is staying as it was before, I didnt change it. I 
think it should be no problem. Now I think I really have some problem 
with either the microcontroller or the JTAG, but dont know where to 
start to fix it.

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 18 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.