Little known facts about DEBUG
Thanks guys for the replies.
I have set up an experiment and found the following results. All testing done with a PIC18LF4620 running INTOSC2 at 4 and 8 MHz. I am observing the character waveform with a digital scope and the characters look to be perfectly formed.
The baudrate is NOT limited to the 'standard' RS-232 speeds of 9600, 19200, 38400 etc. Almost any speed can be entered and the bit times are correctly set.
OSCCON = %01101111 (4 MHz). Here DEBUG_BAUD rate can be any speed up to 30,000 bits per second. DEFINE DEBUG_BAUD 30000 gives correct 33.3 uSec per bit and 395 uS per character. The stop bit is stretched which is no bad thing as it gives the receiving device more time to process the character.
OSCCON = %01111111 (8 MHz). Supports any bit rate up to 60000 bps.
Bit time is 16.7 uSec and character time 195 uSecs.
I am sending from one PIC to another so irrational baud rates don't bother me. I just want fastest reliable speed.
HTH
BrianT