Yes, but you have to be sure that the flag was cleared before. The flag gets cleared if you clear it yourself or if the RX buffer was read. To be sure you can write: UCB0IFG &= ~UCRXIFG; UCB0TXBUF = byte; while( !(UCB0IFG&UCRXIFG) ); Otherwise there could be a set flag from an earlier transmission. Of course there shouldn't be a running transmission in the background that could raise the flag. Another option would be checking for the UCBUSY flag.
↧