CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Odd Error: Function used but not defined: ... set_pullup

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kda406



Joined: 17 Sep 2003
Posts: 97
Location: Atlanta, GA, USA

View user's profile Send private message

Odd Error: Function used but not defined: ... set_pullup
PostPosted: Thu Dec 06, 2018 11:09 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 06, 2018 11:44 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 06, 2018 12:10 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 06, 2018 1:28 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Thu Dec 06, 2018 3:26 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 07, 2018 1:51 am     Reply with quote

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...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group