This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get TI flag to be set when writing into SBUF

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.

Parents
  • 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.

Reply
  • 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.

Children
No data