avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Endless loop in AVR?


From: Wojtek Dabrowski
Subject: Re: [avr-chat] Endless loop in AVR?
Date: Sat, 28 Jul 2007 13:51:46 +0200
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

>> ...the diodes light up when I press the reset button, but
>> as soon as I let go, they go off again.
> 
> If the LEDs are lighting up *while* you have RESET asserted,
> then you have a hardware problem.  PORTD will be in a high impedance
> state so there should be no current flow to permit them to light up.
> How do you have the LEDs connected?

Thanks, you were right - it was a kind of hardware problem (or rather a
PEBKAC in this case...). I'm programming the thing with the bsd
programmer, and I thought leaving it connected to the parallel port
wouldn't be doing anything. Wrong - when I disconnect the programmer
from the parallel port, it works.

One problem though - I seem to be doing something wrong with the reset.
When I press the reset button, I connect the reset pin to Vcc (+5V). But
the chip ignores this and keep happily executing my program. Any idea
what I might be doing wrong there?

> #define NOP() do { __asm__ __volatile__ ("nop"); } while (0)

Thanks, thats a nice idea.

Greets,
-Wojtek

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]