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 support@ccsinfo.com

setup_port_a (); and other stuff not in the manual

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



Joined: 24 Sep 2006
Posts: 262

View user's profile Send private message AIM Address

setup_port_a (); and other stuff not in the manual
PostPosted: Sun Feb 23, 2014 11:24 am     Reply with quote

I sometimes find functions in examples or people's code that are not in the manual or under F11 search.
An example is setup_port_a (ALL_ANALOG); that compiles OK and is only shown in the manual under Program Syntax in the example "Here is a sample program with explanation using CCS C to read adc samples over rs232:"
Where do I find such things defined? Can I make up things like setup_port_c (sAN8|sAN9); I notice that in the 16F1509 .h it says SETUP_ADC_PORTS( ) (aka SETUP_PORT_A), is this just an old function that has been dropped?
I also notice that constants do not seem to be consistent such as NO_ANALOGS and ALL_ANALOG in the .h file for the 16F1509. Is the compiler flexible to changes of spelling or is there a reason for the single and plural words?
Ttelmah



Joined: 11 Mar 2010
Posts: 19381

View user's profile Send private message

PostPosted: Sun Feb 23, 2014 12:19 pm     Reply with quote

SETUP_PORT_A, was dropped about ten years ago, but the compiler will still accept it for reverse compatibility with old code. Only applied to the earliest chips that only supported analog operation on port A. It appeared in very early manuals.
No (individual pins) have the analog property, while all the pins (as an entity), are analog.

Best Wishes
rovtech



Joined: 24 Sep 2006
Posts: 262

View user's profile Send private message AIM Address

PostPosted: Sun Feb 23, 2014 2:17 pm     Reply with quote

Thanks Ttelmah,
yes SETUP_PORT_C will not work.
Regarding my second question, the spelling has to match the .h spelling.
Ttelmah



Joined: 11 Mar 2010
Posts: 19381

View user's profile Send private message

PostPosted: Sun Feb 23, 2014 2:25 pm     Reply with quote

The point is that syntactically that is the way the English language expresses it....
There is an apostrophe missing, but this is now commonly omitted in general use.
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