The hardware UART will buffer up to 2 incoming bytes automatically. Just set it up, enable
it, and read data from the buffer before the 3rd byte is received.
The hardware UART will buffer up to 2 incoming bytes automatically. Just set it up, enable
it, and read data from the buffer before the 3rd byte is received.
So it does or does not work in the background?
What I mean is once you write a HSERIN command it will always write to the register you specify?....then just sample the register when you want?
Or will it only write to the registers once and wait till you do another HSERIN? (or Hserout, whatever the case may be).
I was under the impression the hardware Uart works like that....independently.
?
Thanks.
I also have been toying with the USART and I think had a misconception of what "in the background" meant. I've come to believe it means the USART will suck in two bytes at any time they arrive as long as the buffer is empty. This gives you some time to get there and read them, thus emptying the buffer for another two bytes to arrive. I use the Receive interrupt because I'm receiving 5 bytes at a time. If your program is fast enough I would think you could just poll the RCIF and grab a byte at a time.
I could be way off here but I'm still learning too.
"It will never happen here!" just happened here.
My thoughts and prayers for Sandy Hook victims and families.
Bookmarks