18F25K20
Moderators: David Barker, Jerry Messina
18F25K20 Library Issue
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
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
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
18F25K20
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.
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.
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
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.
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.
- Senacharim
- Posts: 139
- Joined: Tue Aug 10, 2010 5:19 pm
- Location: Ventura, CA
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.
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.
Bermuda Triangle Battalion
from 2026 to 1992
Voted "Most likely to time travel"--Class of 2024.