??? 07/02/04 21:21 Read: times |
#73552 - RE: UART Without Serial Interrupt? Responding to: ???'s previous message |
Transmitter interrupts are as useful as receiver interrupts. They can be used in combination with a fifo, like this:
Transmitter ISR: buffer empty? yes: clear transmitter busy flag and reti no: take byte from buffer, put in sbuf and reti This makes it possible for your main loop to run without waiting for each individual byt to be sent. Just check the busy flag, and if it's free, you can dump your entire message in the buffer at full speed, force a ti and go on with more useful things. You could call it "set and forget" I always use uart interrupts, both ri and ti. |