Sent from an iPhone, but is it mine? On May 18, 2012, at 6:47 AM, "Steven Hodge" <steve@terrafirma.us> 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 Normally you use the DRE for sending out serial data. This gives you the highest data rate. Using TxC adds a short space between characters. In my RS-485 code I use DRE to send the data then TxC to switch the bus transceiver to receive when the packet has been sent. One important point is that DRE will generate an interrupt any time the buffer is empty. So you need to disable the DRE interrupt enable bit when you have sent the last byte. Otherwise it will continue to call the service routine. > [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] Re: USART Interrupts
2012-05-18 by Clark Martin
Attachments
- No local attachments were found for this message.