View previous topic :: View next topic |
Author |
Message |
kda406
Joined: 17 Sep 2003 Posts: 97 Location: Atlanta, GA, USA
|
Odd Error: Function used but not defined: ... set_pullup |
Posted: Thu Dec 06, 2018 11:09 am |
|
|
Today I'm working with a PIC18F67K40 and compiling with V5.081.
For this project, I thought I'd try set_pullup(). When I try to use it, I get an error I do not understand. Here is what I am trying to do: Code: | set_pullup(true, PIN_E3);
set_pullup(true, PIN_E4);
set_pullup(true, PIN_E5);
set_pullup(true, PIN_E6); | When I try to compile, I get the error: Quote: | Error#112 Function used but not defined: ... set_pullup 1756 SCR=20418 |
However, if I use the older method: Code: | port_e_pullups(0x78); // Turn on weak pull up RE3-RE6 | the older method works just fine.
Am I using the new function incorrectly?
Thanks,
Kyle |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9232 Location: Greensville,Ontario
|
|
Posted: Thu Dec 06, 2018 11:44 am |
|
|
quikl comment...
OK, I don't have that PIC or compiler version but.. my thinking is that set_pullup(...) is not available with your version of the compiler.
Jay |
|
|
kda406
Joined: 17 Sep 2003 Posts: 97 Location: Atlanta, GA, USA
|
|
Posted: Thu Dec 06, 2018 12:10 pm |
|
|
I suspect that too. The latest manual says: Quote: | Availability:
All Devices | and I'm using the latest compiler, so it seems like it would be supported.
Since the original post, I tried pins on other ports. I seems set_pullup() just isn't working for this PIC on v5.081. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Dec 06, 2018 1:28 pm |
|
|
Using the PCH command line compiler, I get these errors with the 18F67K40 and vs. 5.081:
Quote: | *** Error 12 "PCH_Test.c" Line 8(11,12): Undefined identifier -- set_pullup
*** Error 12 "PCH_Test.c" Line 9(11,12): Undefined identifier -- set_pullup
*** Error 12 "PCH_Test.c" Line 10(11,12): Undefined identifier -- set_pullup
*** Error 12 "PCH_Test.c" Line 11(11,12): Undefined identifier -- set_pullup
4 Errors, 0 Warnings. |
|
|
|
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
|
Posted: Thu Dec 06, 2018 3:26 pm |
|
|
kda406 wrote: | I suspect that too. The latest manual says: Quote: | Availability:
All Devices | and I'm using the latest compiler, so it seems like it would be supported.
Since the original post, I tried pins on other ports. I seems set_pullup() just isn't working for this PIC on v5.081. |
I am looking at the header file and set_pullup() is not listed inside. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19529
|
|
Posted: Fri Dec 07, 2018 1:51 am |
|
|
I think it is designed for the DsPIC's which have programmable pullup/down.
If you look, there are entries for it in the headers for at the PIC 24/30/33 chips,
but nothing in the PIC12/16/18 files. So an error in the manual, or possibly
they intend to add it in the future and have not yet done so.
Yes. If you explicitly load the PCW manual (pcw.chm), rather than the 'global'
PCD/PCH/PCM manual, there is no reference to this function.
So the 'applies to all chips', is actually for all PCD chips not the rest of the PIC
family... |
|
|
|