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
 Re: HSER baudrate
 Re: HSER baudrate
		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