Page 1 of 1

PORT RC0 PIC18F26K80 never get output[Solved]

Posted: Tue Apr 16, 2019 12:18 pm
by QMESAR
Hi Team.
I have an issue with the Output Icon on PIC18F26K80 RC0 and RC 1 I never get an output on these pins
I then used MPLAB and toggel these pins in Code working fine no problem the HW it seems to be something with the FC component
on PIC18F26K80.
p1.jpg
p1.jpg (7.14 KiB) Viewed 3179 times
Secondly Ben /leigh Please help :oops:
I have difficulties to set the Internal OSC with PLL4 to run at the correct frequency
I use Internal OSC .OSCON 0x70( as helper indicate which is 16MHZ Internal Clock then in Configbits I set the PLL enable but the chip always
run at the 16MHZ no PLL function, Do you know if we should do something else to get it working.

FC Project that blinks led on RB3 and RCop and RC1
P26K80_Blink.zip
(88.32 KiB) Downloaded 219 times

Re: PORT RC0 PIC18F26K80 never get output

Posted: Tue Apr 16, 2019 1:23 pm
by Benj
Hi Peter,

Could it be the XC8 version supplied with Flowcode is out of date for the device?

Have you tried pointing Flowcode to the compiler used for MPLAB and seeing if that helps at all?

Regarding the PLL issue, maybe try disabling the Fail-Safe clock monitor or the Internal/External switchover config settings, I think these can sometimes cause issues with PLLs.

Re: PORT RC0 PIC18F26K80 never get output

Posted: Tue Apr 16, 2019 1:56 pm
by QMESAR
Hi Ben,
Thank for your advice :D
To be honest I am an old man and born before computers so I never scratch inside the machine of FC .
I can try to use the MPLAB X compiler version but help me to do that :oops:

Re: PORT RC0 PIC18F26K80 never get output

Posted: Tue Apr 16, 2019 2:33 pm
by QMESAR
Update:

Hi Ben.
Ok getting to run at 64Mhz I have to add manually in C code or set the PLL bit to 1

Code: Select all

OSCTUNE = 0x40; 
This activate the PLL and the Chip run at 64Mhz from the 16MHZ internal oscillator. Using the PLL bit in the Configuration settings(FC) has no effect
just to let you know However that solved the SPI that was working fine on 16MHZ with FOSC/4 = 4MHZ stop to work at 64Mhz even with FOSC/16 and FOSC/64 settings the SPI stopped ,Can you think of anything that can cause that :shock:

Re: PORT RC0 PIC18F26K80 never get output[Solved]

Posted: Fri Apr 19, 2019 9:01 am
by QMESAR
Hi Team.

Just as an info for others the P18F26K80 is a bit tricky with the configuration bits to get the RC0 and RC1 pins to work as digital you have to set
the SOSC Power bit to Digital :wink:
:D
2019-04-19_11-49-44.jpg
2019-04-19_11-49-44.jpg (153.3 KiB) Viewed 3144 times