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

Library Files

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



Joined: 19 May 2018
Posts: 27

View user's profile Send private message

Library Files
PostPosted: Wed Dec 04, 2019 1:24 pm     Reply with quote

Just trying to understand Info in Library Files. Below is a capture of 18f23k22.h file. What is the relationship of these numbers and the port outputs? They don't appear to be the equivalent of the Hex address.
Code:

#define PIN_A0  31744
#define PIN_A1  31745
#define PIN_A2  31746
#define PIN_A3  31747
#define PIN_A4  31748
#define PIN_A5  31749
#define PIN_A6  31750
#define PIN_A7  31751


Thanks
Kevin
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Dec 04, 2019 1:50 pm     Reply with quote

They're not.... you can use the 'search' feature here and find a few posts about it. It's 'shorthand' for the Compiler to know which pin of what port.
Jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 04, 2019 2:03 pm     Reply with quote

Convert the CCS pin numbers to hex. The lower 3 bits are the bit number
and the upper bits are the port address, shifted left by 3 bit positions.
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