Serout2 sends LSB first – your HSB appears to be the one that is corrupted. This screams “timing issue” to me. If you are using the Internal Oscillator (which it appears you are), you might want to switch to a XTAL for reliable timing. If that is not possible, consider a slower baud rate or get a good scope and play with the OSCAL value until the timing works (at the given temperature – it will change if the temperature changes).
HTH,




Bookmarks