View previous topic :: View next topic |
Author |
Message |
gtx15
Joined: 19 May 2018 Posts: 27
|
Library Files |
Posted: Wed Dec 04, 2019 1:24 pm |
|
|
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: 9469 Location: Greensville,Ontario
|
|
Posted: Wed Dec 04, 2019 1:50 pm |
|
|
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
|
|
Posted: Wed Dec 04, 2019 2:03 pm |
|
|
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. |
|
 |
|