18F25K20

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

18F25K20

Post by Widgetman » Sun Mar 23, 2008 2:55 pm

Hi,
I need to get a support file for the 18F25K20, and was wondering if any new support files are available. If not is it hard to create one for a new part ?
Thanks

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Sun Mar 23, 2008 3:19 pm


Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

18F25K20 Library Issue

Post by Widgetman » Sun Mar 30, 2008 5:43 pm

Hi,
Thanks for the link. I installed the 18F25K20 library, and I get a error in the
utils.bas file I am linking in stating Identifier not declared for CMCON
I think it may be suppose to be named CM1CON0 or CM2CON0 but I want to clarify this before I manually change it.
Thanks

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Tue Apr 01, 2008 12:38 pm

No modules have been tested against these devices - the download only provides the definition files so that you can compile. Without looking at the datasheet, it sounds like you need to manually edit...

rubenpena
Registered User
Registered User
Posts: 32
Joined: Sun Mar 25, 2007 2:07 am
Location: Monterrey,Mexico

18F25K20

Post by rubenpena » Sat Apr 12, 2008 7:35 pm

Hi David:
I have an application running in a 18f2520. I downloaded the 18F25K20 inc file,and try to compile for the K, but it shows the following errors:
[Error] utils.bas(446):left side cannot be assigned to
[Error] utils.bas(446):Identifier not declared: CMCON
I was including SetAllDigital(), to disable ADC and comparators, so I eliminate it, to avoid the call to the offending lines and did set all digital directly, but the compiler still calls the now not included utils.bas routine,showing the same error...
Do you can help ,please...?
Thanks in advance...
Ruben de la Pena V.

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Sat Apr 12, 2008 7:44 pm

If you want to use the utils module, you will need to edit the SetAllDigital() routine to support your device - else remove the include completely.

rubenpena
Registered User
Registered User
Posts: 32
Joined: Sun Mar 25, 2007 2:07 am
Location: Monterrey,Mexico

Post by rubenpena » Sat Apr 12, 2008 8:08 pm

Hi David:
I did remove the include file, and still was opened by the compiler.(???).
Then I added the all digital configuration:
// SetAllDigital() FOR THE 18F25K20
CM1CON0 = 0
CM2CON0 = 0
ansel = 0
ANSELH = 0
OSCCON = $60 // INTERNAL OSC AT 8 MHZ
OSCTUNE.6 = 1 // ENABLE PLL
and it works OK. I did compile and run the application OK.
I am very happy...
Thanks again...
Ruben de la Pena V. :D

skartalov
Posts: 37
Joined: Fri Apr 09, 2010 10:50 am
Location: BULGARIA

Post by skartalov » Thu Feb 21, 2013 9:53 am

Hi, what exactly I have to declare that way, so the PIC18F25K20 to use internal OSC with PLL for CLOCK=64 MHz?

User avatar
Senacharim
Posts: 139
Joined: Tue Aug 10, 2010 5:19 pm
Location: Ventura, CA

Post by Senacharim » Thu Feb 21, 2013 3:45 pm

Lots of the system designators ('OSC', for example) differ in the K series PICs from others in the PIC18 line. You'll need to adapt your code to suit.

Also, it's 'FOSC'

Read those specs! Pay attention and you'll do fine.
Surviving Member
Bermuda Triangle Battalion
from 2026 to 1992

Voted "Most likely to time travel"--Class of 2024.

Post Reply