PORT RC0 PIC18F26K80 never get output[Solved]

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

Moderator: Benj

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1186
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 376 times
Been thanked: 604 times
Contact:

PORT RC0 PIC18F26K80 never get output[Solved]

Postby QMESAR » Tue Apr 16, 2019 12:18 pm

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 1081 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 50 times

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

Re: PORT RC0 PIC18F26K80 never get output

Postby Benj » Tue Apr 16, 2019 1:23 pm

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: 1186
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 376 times
Been thanked: 604 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output

Postby QMESAR » Tue Apr 16, 2019 1:56 pm

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: 1186
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 376 times
Been thanked: 604 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output

Postby QMESAR » Tue Apr 16, 2019 2:33 pm

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: 1186
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 376 times
Been thanked: 604 times
Contact:

Re: PORT RC0 PIC18F26K80 never get output[Solved]

Postby QMESAR » Fri Apr 19, 2019 9:01 am

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 1046 times
These users thanked the author QMESAR for the post (total 4):
medelec35 (Fri Apr 19, 2019 9:13 am) • Benj (Tue Apr 23, 2019 9:56 am) • Zane (Fri May 31, 2019 12:06 pm) • AbhijitR (Mon Dec 02, 2019 11:07 am)
Rating: 20%