How to check if a microcontroller is broken?

Gast #885333
Lesenswert?

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
Lesenswert?

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
Lesenswert?

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
Lesenswert?

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

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren