PIC18F14K22 Oscillator question

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

Moderator: Benj

Post Reply
radist73
Posts: 36
Joined: Mon Dec 22, 2014 10:04 pm
Location: TALLINN
Has thanked: 5 times
Been thanked: 2 times
Contact:

PIC18F14K22 Oscillator question

Post by radist73 »

Hi,
Seems as Oscillator Config in Project Options not works as need.
My pic starts only after adding C code at the begin of chart.

OSCCON=0b01110110;
OSCCON2=0b00000010;
OSCTUNE=0b11000000;

It is starts at 16MHZ.

Now I need to use PLL to starts internal OSC at 64MHZ. I need to add to C code configuration register CONFIG1H=0b01011000
but compiler give error message

LCD_Enc_test.c: main()
4758: CONFIG1H=0b01011000;
^ (192) undefined identifier "CONFIG1H"
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1

Can you advice to run PIC with internal oscillator at 64MHZ?
Thanks!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PIC18F14K22 Oscillator question

Post by medelec35 »

radist73 wrote: I need to add to C code configuration register CONFIG1H=0b01011000
but compiler give error message
Error is there because you cant add any CONFIG statments.
You must set the CONFIG within Flowcode configuration settings (Build, Project options) only.
Martin

radist73
Posts: 36
Joined: Mon Dec 22, 2014 10:04 pm
Location: TALLINN
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: PIC18F14K22 Oscillator question

Post by radist73 »

Thanks for reply! But could you check, may be component have any problem? Seems as PLL cant start...

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PIC18F14K22 Oscillator question

Post by medelec35 »

If you post your flowchart I can see if I can spot the issue.
Martin

Post Reply