The problem seems to be bigger.
I set OSCTUNE = 0xc0 with the same settings and additionally.
FC9 does not respond to this.
With the software mikroBasic Pro for PIC I got the PIC to run at 48Mhz.
I also have there too
OSCCON = 0x70 and OSCTUNE = 0xc0 set.
configuration
register
CONFIG1L : $3FF8 : 0x008E
CONFIG1H : $3FF9 : 0x00F7
CONFIG2L : $3FFA : 0x0012
CONFIG2H : $3FFB : 0x00FF
CONFIG3L : $3FFC : 0x00F7
CONFIG3H : $3FFD : 0x00F9
CONFIG4L : $3FFE : 0x00CF
CONFIG4H : $3FFF : 0x00F1
program pic18f24j50
' Declarations section
' Main program
dim uart_rd as byte
main:
OSCCON = 0x70
OSCTUNE = 0xc0
trisc.2=0
portc.2=0
UART1_Init(9600) ' Initialize UART module at 9600 bps
Delay_ms(100) ' Wait for UART module to stabilize
UART1_Write_Text("Ready")
UART1_Write(10) ' Line Feed
UART1_Write(13) ' Carriage Return
while (TRUE) ' Endless loop
if (UART1_Data_Ready() <> 0) then ' If data is received,
uart_rd = UART1_Read() ' read the received data,
UART1_Write(uart_rd) ' and send data via UART
end if
portc.2=1
delay_ms(1000)
portc.2=0
delay_ms(1000)
wend
end.