Hi
I have a 18F46K22...Flowcode7 V7.2.1.4
I wish to run at 64mhz PLL, and have set all the parameters
correctly, config setup / compiler speed / osccon / osctune
with 1sec led test....it flashes led at 4 sec intervals which
tells me the compiler setting is correct but the other settings also
look correct
Not sure now what is the problem??
Attached file for help pls
thanks
Mark
Speed not correct [solved]
Moderator: Benj
-
- Flowcode v5 User
- Posts: 118
- Joined: Thu Sep 17, 2009 1:30 pm
- Has thanked: 3 times
- Been thanked: 11 times
Speed not correct [solved]
- Attachments
-
- FC7_TEST_64MHZ_18F46K22.fcfx
- (10.42 KiB) Downloaded 230 times
- 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: Speed not correct
Hi Mark,
In your configuration settings try enabling either the Fail-Safe Clock Monitor or the Internal/External Oscillator Switchover or both. I think when I've had PLL issues in the past one of these settings allowed the PLL to fire up and start working.
In your configuration settings try enabling either the Fail-Safe Clock Monitor or the Internal/External Oscillator Switchover or both. I think when I've had PLL issues in the past one of these settings allowed the PLL to fire up and start working.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 118
- Joined: Thu Sep 17, 2009 1:30 pm
- Has thanked: 3 times
- Been thanked: 11 times
Re: Speed not correct
Hi Ben
I found the problem
Once PLL is enabled config and osctune, the osccon (bit 0/1) must be set
to both 0 (primary clock set as source)....its counter intuitive but correct
because when PLL is enabled it takes internal osc first into the PLL block
and then outputs as the primary source
Page 26 of the datasheet shows this.....
So for others that have this issue, there is the solution
Thanks
Mark
I found the problem

Once PLL is enabled config and osctune, the osccon (bit 0/1) must be set
to both 0 (primary clock set as source)....its counter intuitive but correct
because when PLL is enabled it takes internal osc first into the PLL block
and then outputs as the primary source
Page 26 of the datasheet shows this.....
So for others that have this issue, there is the solution
Thanks
Mark