[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Newbie - should this work?
From: |
Volkmar Dierkes |
Subject: |
Re: [avr-gcc-list] Newbie - should this work? |
Date: |
Fri, 17 Jan 2003 15:04:22 +0100 |
Josh,
Josh Thompson <address@hidden> schrieb am 17.01.03 14:41:47:
> I'm new at using working with embedded systems. I am fairly familiar
> with using gcc under Linux. I am using an ATmega128, avr-gcc, and usip
> with a ByteBlaster programmer. uisp says it detects the chip and then
> loads the code into flash. I can dump the code and get the same thing
> that I uploaded; so, I think this part is working okay. Here is my code:
>
> main.c:-------------------------
> #include <io.h>
>
> int main() {
> DDRD = 0xff;
> PORTD = 0X00;
> }
> -------------------------------
You need always an endless loop in your embeded system. Otherwise the mcu is
running through its non used flash memory and you didn't know whats happen.
Therefore change it to this:
int main() {
DDRD = 0xff;
PORTD = 0X00;
for(;;);
}
In this case you should geht your port D with <0.5V
Volkmar
______________________________________________________________________________
Jetzt 52 verschiedene Briefpapiere fur Ihre E-Mails bei
WEB.DE FreeMail - http://freemail.web.de/features/?mc=021140
avr-gcc-list at http://avr1.org
RE: [avr-gcc-list] Newbie - should this work?, Tom Harris, 2003/01/26
Re: [avr-gcc-list] Newbie - should this work?, Christoph Plattner, 2003/01/26