Okay, I've downloaded WinAvr, and are fiddling with my first experiments on a atmega128. I have been able to compile a blinking led program, and let it actually run on the atmega128.
Now I am trying some inline assembly, and the compiler complains about possible contraint problem with %1. While I understand that there are simpler ways to send some value to port b, I'd like to know what is wrong with my code:
#include
int main (void) { unsigned char outputvalue;
//set PORTB for output DDRB =0xFF;
// this I want to sent to port b outputvalue = 0x55;
while (1) { asm volatile( "out %1, %0" "\n\t" : "=&r" (outputvalue) : "I" (PORTB) );
} return 1; }
Any suggestions?