Using pic18f25k22

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
john hauton
Posts: 40
Joined: Wed Jul 08, 2009 3:23 pm
Been thanked: 2 times

Using pic18f25k22

Post by john hauton »

Hi, I am having a problem using the above chip. I did a simple led on off routine on port c bit 3, and the chip programs,
and verifies ok. However it doesent work! I'm using a 4MHz resonator as the oscilator, but I have no idea how to set
the config options for this chip. I am using the latest v4 flowcode, and set the oscillator for 4000000Hz.
Any ideas would be welcome.

My reason for connecting the led on port c bit 3 is that I have a pic type arduino board with the led fitted.

Thanks and regards john

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: Using pic18f25k22

Post by Benj »

Hi John,

Can you post up the file you have so far and I will have a look at your config settings for you.

john hauton
Posts: 40
Joined: Wed Jul 08, 2009 3:23 pm
Been thanked: 2 times

Re: Using pic18f25k22

Post by john hauton »

Hi Benj, hope this works!
Attachments
25k22test.fcf
(5 KiB) Downloaded 307 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: Using pic18f25k22

Post by Benj »

Hello John,

Ok I have embedded some config data into the file for you and hopefully the program will now run correctly on the chip for you. There is a PLL enable setting in the config which I have disabled but if you enable this then I think this will give you 4x the clock speed from your 4MHz resonator.
Attachments
25k22test.fcf
(5 KiB) Downloaded 302 times

john hauton
Posts: 40
Joined: Wed Jul 08, 2009 3:23 pm
Been thanked: 2 times

Re: Using pic18f25k22

Post by john hauton »

Hi Benj,

Thank you very much, it now works!.. Now I will go and
study these config settings.. Tell me, is there any documentation
on these, or is it just the data sheets you have to trawl through?
regards john

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: Using pic18f25k22

Post by Benj »

Hi John,

The config section in the device datasheets isn't great but should help to get you started and understand what each setting does. Once you know what settings work on one 18F device you should be able to get most others working correctly.

john hauton
Posts: 40
Joined: Wed Jul 08, 2009 3:23 pm
Been thanked: 2 times

Re: Using pic18f25k22

Post by john hauton »

Hi Benj,
I find that with some of these datasheets they assume you have a degree in microprocessors.
Still, at least thanks to you I found out that this 25k22 works ok!
Strangely, this is the first chip where I had to change anything! I take it that if i wanted to
program this chip in situ using icsp i would need to enable the lvp bit.

Thanks again Benj regards john

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: Using pic18f25k22

Post by Benj »

Hello John,

Great glad you got it working, thanks for letting us know.

ICSP does not require LVP to be enabled which is good as I would advise giving LVP a wide berth as there are so many issues associated with it.

I agree about needing the degree for the datasheets :) My learning method is normally to base 50% off the datasheet and 50% from known working code if available and then try and merge the two.

john hauton
Posts: 40
Joined: Wed Jul 08, 2009 3:23 pm
Been thanked: 2 times

Re: Using pic18f25k22

Post by john hauton »

Hi Benj,
Sorry for the delay,
I 'd just like to thank you for all your help

Regards john

Post Reply