Olin Lathrop wrote: > > > Its's not enough. Will work only first time after a reset. I've tested. > > Next time when will come a character with other baud rate, the receiver > > it's still stick on the old baudrate and a frame error will occur. Before > > setting a new value for SPBRG and BRGH, a reset must be produced and new > > values could be written in those register. > > I know you say you've tested this, but I still find this very hard to > believe. Did you try completely disabling the UART, changing the baud rate, > then enabling the UART again? I have a feeling something else was going on > in your test that made it appear as if the processor had to be reset to > change baud rate. > > I don't have time to test this now myself, but this is just too bizarre for > me to believe without seeing it myself where I can carefully control the > conditions to my own satisfaction. I've got an idea I got caught with this also. It was a while ago, but from memory I had to transmit a dummy byte to "flush" the UART and then it would work ok. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu