Hi,
I'm using a PIC18F2331 running at 40MHz and my program is quite heavy, the µC got a lot of work to do with a lot of interrupts.
I usually use the HSEROUT command for sending 8 variables to my PC via UART, like this :
But I noticied that this command is very time-consuming in my program, and it disturbs some of my high-frequency interrupts.Code:hserout[a,b,c,d,e,f,i,j] (values from a to j are bytes)
So I'm considering to NOT use that HSEROUT command, but manually fill the TXREG buffer :
But how I can send all my byte-sized variables (a,b,c,d,e,f,i,j) at the same time with this method?Code:If PIR1.4 = 1 Then TXREG = a ' Send character to transmit register endif
Thanks




Bookmarks