Sorry. Your original post indicates DEFINE OSC 20 with a 20MHz osc. I didn't know you were trying this at 48MHz.
If you're changing config settings with your EPIC software, and you have the "Reread File Before Programming" and "Update Configuration From File" options checked, then it's going to reload whatever config word settings are embedded in your .hex file before programming the part.
You should click Save before programming to use whatever config word changes you made. Then program it.
With a 20MHz crystal, PIC18F4550, and this osc configuration;
CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,FOSC=HSPLL_HS
This works perfectly at 9600;
SEROUT2 PORTB.7,16468, ["TEST",13,10]
If you prefer to use 20MHz without HSPLL, just change FOSC=HSPLL_HS to FOSC=HS and DEFINE OSC 48 to DEFINE OSC 20.
This also works 100%. At least on my board.
Bookmarks