Re: [AVR-Chat] polling or interrupt driven transmission and receiving.
2007-11-10 by BobGardner@aol.com
The advantage of using interrupts to send and/or receive is that the cpu can do other things while the serial comms are occuring. One char at 115200bps takes about 83usec, but it only takes a couple of usec to interrupt, grab the char, put it in a buffer, and return from interrupt. So 4 usec out of 80 usec cpu is used (5% cpu use), as opposed to 80 usec out of 80usec (100% use) while comms are happening. If the avr doesn't have anything else to do, it doesn't matter. Might as well send one char at a time polled. In a message dated 11/10/2007 12:12:32 P.M. Eastern Standard Time, al.lu@telia.com writes: Hi, I try to write a routine for RS232 communication between PC and AVR. Which way is best if I transmit a string to PC by using a interrupt driven transmission or not by using interrupt? How will performance affects if a string is long by interrupt driven transmission? Will interrupt occur character by character? Thanks in advance! Best Regards Alex Yahoo! Groups Links ************************************** See what's new at http://www.aol.com [Non-text portions of this message have been removed]