OK, Newbie here. I'm just starting out on an ATMEGA2560 on the STK600 using AVR studio . I want to do something simple like turn on all the LEDs. I'm trying to learn the nuts and bolts of it, so I don't want just do an #include <avr.io.h>. I thought I could do something like make my own .h file and define my ports there:
#define DDRB 0x24
#define PORTB 0x25
// DDRB as output
DDRB = 0xff;
// Turn ON all LEDS
PORTB = 0x0;
I know, I'm being incredibly naive and ignorant. I tried looking at avr32/io.h, but I couldn't find my device. I'm guessing there are multiple files that are being included and I just don't recognize them.
How are ports defined? Or, can you recommend a good resource?