??? 04/16/09 13:01 Modified: 04/16/09 13:06 Read: times |
#164661 - More things will happen... Responding to: ???'s previous message |
Chico said:
When the serial interrupt is enabled, what happens if TI or RI is not cleared? Serial interrupt will not occur anymore, or serial interrupt will occur repeatedly until TI/RI is cleared? As long as the RI/TI flags are set the polling scheme will notice the set flags and will enter the interrupt service routine over and over again. Not resetting the TI flag usually makes the code think that the transmitting of last byte is still in progress. And not resetting the RI flag makes that a new arriving byte is not loaded into the SBUF and is irretrievably lost. Kai |