??? 11/30/04 11:06 Read: times |
#82231 - Why interrupt driven? Responding to: ???'s previous message |
If you are in need for speed, you should definitely consider interrupt driven transmission. "Why is that?" you may ask... Going interrupt-driven does not make the UART transmission itself any faster. The advantage of interrupt-driven IO is that your whole program doesn't have to stop & wait in a while (!TI); loop until the character is transmitted. Instead, your "main" program gets on with its business and the Interrupt Service Routine (ISR) simply sets a flag to note that the transmission has completed. The "main" program can then check this flag at its convenience. For best results, you add a buffer where the "main" program simply writes its whole message, and then effectively forgets about it. The ISR is then called automatically each time a character transmission completes, and loads-up the next one - without any further intervention from the "main" program! Similarly for interrupt-driven reception. Obviously, you need a bit of "housekeeping" to make sure you don't overrun buffers, etc. This is all illustrated in the links I posted earlier. |
Topic | Author | Date |
THE TIME OF TI | 01/01/70 00:00 | |
Bitrate | 01/01/70 00:00 | |
interrupt-driven | 01/01/70 00:00 | |
Why interrupt driven? | 01/01/70 00:00 | |
UART Serial Port Interrupt | 01/01/70 00:00 | |
all the above | 01/01/70 00:00 | |
UART communication by UART interrupt | 01/01/70 00:00 | |
just TI=1 | 01/01/70 00:00 | |
serial interrupt in adc interrupt | 01/01/70 00:00 | |
start with something simple | 01/01/70 00:00 | |
misunderstand behaviour | 01/01/70 00:00 | |
See the examples | 01/01/70 00:00 | |
not has to, but can | 01/01/70 00:00 | |
The difference is | 01/01/70 00:00 | |
" | 01/01/70 00:00 | |
He's right | 01/01/70 00:00 | |
How the 8051 UART works | 01/01/70 00:00 | |
The TI-bit Set Time | 01/01/70 00:00 | |
no, at the middle | 01/01/70 00:00 | |
The Transmitter Part, Actually | 01/01/70 00:00 | |
Setting of TI | 01/01/70 00:00 | |
sometimes chip designers listen | 01/01/70 00:00 | |
So, Erik | 01/01/70 00:00 | |
where does it happen | 01/01/70 00:00 | |
Mode 1 TI timing. | 01/01/70 00:00 | |
How to post code | 01/01/70 00:00 | |
RS485 & bus turnaround![]() | 01/01/70 00:00 |