Hi Michael
thank you for your reply.
No big deal! I discovered it when I tried to simulate a program that
uses interrupt-driven and buffered USART communication. I quadruple
checked and conclude that the real Atmega 168 definately fires the
interrupt right away.
Also the datasheet confirms this behavior [1, p. 182]:
"The Data Register Empty (UDREn) Flag indicates whether the transmit
buffer is ready to receive
new data. This bit is set when the transmit buffer is empty, and
cleared when the transmit buffer
contains data to be transmitted that has not yet been moved into the
Shift Register. For compatibility
with future devices, always write this bit to zero when writing the
UCSRnA Register.
When the Data Register Empty Interrupt Enable (UDRIEn) bit in UCSRnB
is written to one, the
USART Data Register Empty Interrupt will be executed as long as UDREn
is set (provided that
global interrupts are enabled). UDREn is cleared by writing UDRn. When
interrupt-driven data
transmission is used, the Data Register Empty interrupt routine must
either write new data to
UDRn in order to clear UDREn or disable the Data Register Empty
interrupt, otherwise a new
interrupt will occur once the interrupt routine terminates."
Maybe someone else can confirm this, too?
Best wishes
Mirt
[1] Atmel: ATmega48/88/168 datasheet,
http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf