[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] newbie question on avr-lib and stk500
From: |
Rainer Faulstich |
Subject: |
[avr-libc-dev] newbie question on avr-lib and stk500 |
Date: |
Thu, 22 May 2003 10:16:27 +0200 |
Hi,
i am a beginner with avr, writing code for atmega128 using avr-gcc and avr-lib
and testing with stk500/501 i/o LEDs.
I modified the example "basic_io" provided with avr-lib a bit and connected the
STK500 LED Header to the PORTB header.
// snipp.....................
unsigned char a;
outb(DDRB, 0xFF); // set all port B pins to output
outb(PORTB, 0xFF); // switching all LEDs OFF
a=0x3C;
outb(PORTB, a);
//...................... snipp
This piece of code does not show the expected result 00111100 but gives
10000000. If i use the last line as "outb(PORTB, 0x3C)" omitting the variable a
the result is as expected.
My question: where is the RAM area located ? Are there any macros in avr-lib
where i can change it. I suspect that the variable is not available.
Regards Rainer
-----------------------------------------
Rainer Faulstich
Ingenieurb?ro f?r Prozessautomatisierung, ifp
Friedrich Werber Str. 44
D-78315 Radolfzell
Tel: (+49) 7732 98 27 89 - 12
Fax: (+49) 7732 98 27 89 - 44
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-dev] newbie question on avr-lib and stk500,
Rainer Faulstich <=