PORT RC0 PIC18F26K80 never get output[Solved]

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

PORT RC0 PIC18F26K80 never get output[Solved]

Post 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 3183 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 220 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output

Post 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.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output

Post 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:

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output

Post 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:

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output[Solved]

Post 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 3148 times

Post Reply