Starting internal oscillator on 18F14K22

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
alb10811
Posts: 7
Joined: Sun Jan 23, 2011 4:01 am
Has thanked: 3 times
Contact:

Starting internal oscillator on 18F14K22

Post by alb10811 »

Hi

I'm trying to program a PIC18F14K22 and I'm having trouble, I think, with getting the internal oscillator to start. I'm just trying to turn an LED on and off but with no success. I'm using Hi_Tech C complier and a PicKit3. I can compile the code and program the pic fine but cannot get the LED to turn on.

Any help would be great.

Thanks

Amy

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: Starting internal oscillator on 18F14K22

Post by medelec35 »

Hi Amy,

Have you used a C block at the beginning of your with an osccon command (e.g osccon = 0x70;) set at a value suitable for your application?
Take a look at http://www.matrixmultimedia.com/mmforum ... 368#p16368
There is a bit of information on osccon.

Or you can search for that keyword on this forum.
The datasheet for 18F14K22 will have the correct values for osccon.

If your still stuck ,then post a flowchart and state the osc speed you require.
We can then take a look at it for you.

Martin
Martin

alb10811
Posts: 7
Joined: Sun Jan 23, 2011 4:01 am
Has thanked: 3 times
Contact:

Re: Starting internal oscillator on 18F14K22

Post by alb10811 »

Thanks Martin

I do have the C block at the beginning with an osccon command. I think the problem is related to the 18F14K22 definition file I have as I can not configure the chip in the configure chip settings as it is not listed in the drop down box.

I did manage to get it working by using MPLAB to configure and program the chip by importing the hex file I created in Flowcode. I would prefer to do the whole lot with Flowcode by this may not be possible.

Amy

Post Reply