??? 03/01/04 21:33 Read: times |
#65779 - RE: What is wrong in my serial comm prog Responding to: ???'s previous message |
Deepak Kash wrote:
------------------------------- then that interrupt should check for TI and clear it and then transmit the next char ? Like patrick said 'an interrupt cannot check for a flag being set or reset....' This flag has to be checked by the program(software). TI is set to 1 when the data has been transmitted and it signifies that SBUF is empty and that another data byte can be sent. If the program fails to check to wait for the TI flag and overwrites SBUF while a previous data byte is in the process of being transmitted, u might get some 'garbage' results. Hope this helps... regards Ashish |