Hi,
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;
}
-------------------------------
Makefile:----------------------
all: main
main: main.c
avr-gcc -D__AVR_ATmega128__ main.c -o main
avr-objcopy --output-target=srec main main.srec
-------------------------------
These are the steps I am taking:
./uisp -dprog=abb -dlpt=/dev/parport0 --upload if=main.srec
after this, I disconnect the programmer cable
disconnect power
reconnect power
At this point, I would expect to read 0 volts on the PORTD pins, but I
am reading 1.5 volts.
Should this work? Am I following the right steps?
I have also tried it with 'PORTD = 0xff;' and still get 1.5 volts.
Thanks for your help,
Josh
avr-gcc-list at http://avr1.org