>> ...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

_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to