Page 1 of 1
Using pic18f25k22
Posted: Fri Jan 13, 2012 1:22 am
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
Re: Using pic18f25k22
Posted: Fri Jan 13, 2012 11:38 am
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.
Re: Using pic18f25k22
Posted: Fri Jan 13, 2012 1:22 pm
by john hauton
Hi Benj, hope this works!
Re: Using pic18f25k22
Posted: Fri Jan 13, 2012 1:57 pm
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.
Re: Using pic18f25k22
Posted: Sat Jan 14, 2012 2:21 pm
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
Re: Using pic18f25k22
Posted: Mon Jan 16, 2012 12:33 pm
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.
Re: Using pic18f25k22
Posted: Tue Jan 17, 2012 1:10 am
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
Re: Using pic18f25k22
Posted: Tue Jan 17, 2012 12:08 pm
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.
Re: Using pic18f25k22
Posted: Sat Feb 04, 2012 2:00 am
by john hauton
Hi Benj,
Sorry for the delay,
I 'd just like to thank you for all your help
Regards john