LPC2138 TX FIFO full
I've sent to THR so not to exceed 16? The transmit holding register
empty bit only says it's not empty. Any way of knowing it's full so I
can stop sending chars?
>If I enable the TX FIFO do I have to keep track of how many characters
>I've sent to THR so not to exceed 16? The transmit holding register
>empty bit only says it's not empty. Any way of knowing it's full so I
>can stop sending chars?
The way that is usually serviced is to on receiving the interrupt (or
polling to find the flag set), send up to 16 bytes/characters to the FIFO
or as many as are ready. Then poll or wait for another interrupt for the
next burst. So yes, essentially you count how many you put in, it's
probably not worth the extra logic to spread that among multiple calls
though, If you are interrupt driven spreading the count would probably be
a lot of overhead for very little return.
" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III