Hi, I'm trying to simulate working of a UART. When I write into SBUF, the TI flag doesn't go high even though I have enabled interrupts. Is there any way I can simulate it using SOUT VTREG. can't find example how to use SOUT.
Hi VK, I am have facing the same problem as you have mentioned i.e not able to get TI interrupt but for some reason but RI interrupt is immediately addressed when I press a key. I was under the impression that as soon as you write something to SBUF you would get TI interrupt but it does not happen. Do you have any additional information on this? Please reply to my hotmail id (rohitsivakumar@hotmail.com)
TI is set after the entire Byte plus the start and stoip bit are transmitted. That is the point of doing it with an interupt.you can do other things while waiting for the byte to finish leaving. If it set immediatly why would you need to look at it. Set a break point at you serial interupt. It will get there. It may take awhile single stepping.