If you need to change the baud rate during run time do not use defines. Deal with the registers directly.
Code:X VAR WORD START: RCSTA.4 = 0 : RCSTA.4 = 1 RCSTA=$90:TXSTA=$24:SPBRG=129 HSERIN [dec X] HSEROUT [DEC X.7,13] blah blah
If you need to change the baud rate during run time do not use defines. Deal with the registers directly.
Code:X VAR WORD START: RCSTA.4 = 0 : RCSTA.4 = 1 RCSTA=$90:TXSTA=$24:SPBRG=129 HSERIN [dec X] HSEROUT [DEC X.7,13] blah blah
Dave
Always wear safety glasses while programming.
Bookmarks