View previous topic :: View next topic |
Author |
Message |
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
PIC16F1825 #PIN_SELECT U1TX=PIN_A1 |
Posted: Mon Mar 17, 2014 9:30 am |
|
|
Hi
Version - 5.020
Pin selection on my 16F1825 wont work, Why?
Code: | Problem, this wont work:
//#PIN_SELECT U1TX=PIN_A1
//#PIN_SELECT U1RX=PIN_A0 |
This is my work around:
#byte APFCON0=getenv("SFR:APFCON0") |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 17, 2014 9:36 am |
|
|
If I do a search for "PPS" or for "pin select" in the 16F1825 data sheet,
I don't find it. But if I do the search in, for example 18F4J11, there is
a large section on PPS. Therefore, it's not supported in the 16F1825.
Instead, the APFCON method is used. |
|
|
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
|
Posted: Mon Mar 17, 2014 10:47 am |
|
|
USP
Is there some CCS way to configure that, or is it the way I use now? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Mon Mar 17, 2014 12:04 pm |
|
|
Worth saying that #bit is in one sense much more friendly for this. So:
Code: |
#bit RXDTSEL=getenv("BIT:RXDTSEL")
#bit TXCKSEL=getenv("BIT:TXCKSEL")
RXDTSEL=1;
TXCKSEL=1;
|
The compiler 'knows' about the bit names for RX, and TX in APFCON0.
Best Wishes |
|
|
|