I this a bug, ar have I set something wrong?
In Avr Studio 4 the configuration is set to ATMEGA168 yet Im haveing problems which 'might be attributed to the following generated code. (Mega 168).
51: UCSR0B &= ~(1<<TXEN0); // DISABLE Tx
+0000022D: 918000C1 LDS R24,0x00C1
+0000022F: 7F87 ANDI R24,0xF7
+00000230: 938000C1 STS 0x00C1,R24
The Data sheet states that when using LD and ST instructions 0x20 must be added to the address.
This doesn't look like its being compiled correctly and might explain the problems Im having.
AVR Studio 4.13.528
GUI Version 4, 13, 0, 528
JTAGICE mkII 1, 0, 1, 140