Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: USART Interrupts

2012-05-18 by David Kelly

On May 18, 2012, at 8:47 AM, Steven Hodge wrote:

> This is somewhat of an aside.   I just finished porting my USART ISR's from
> mega to xmega.   They only use the Receive Complete (RXC) and Transmit
> Complete (TXC) interrupts.  I've always been curious as to when one would
> use the "Data Register Empty" (DRE) interrupt.  Can somebody give a brief
> reason when and why to use this one?  Thanks, Steve

The USART transmit is "double buffered" (UARTs were not always) with a data buffer and a serial buffer. DRE indicates when data has moved into the shift register. TXC indicates when the shift register is empty. DRE gives you one extra character interval to get the next character into place before a gap appears on the TXD wire.

--
David Kelly N4HHE, dkelly@HiWAAY.net
============================================================
Whom computers would destroy, they must first drive mad.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.