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

PIC16F1825 #PIN_SELECT U1TX=PIN_A1

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



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PIC16F1825 #PIN_SELECT U1TX=PIN_A1
PostPosted: Mon Mar 17, 2014 9:30 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 17, 2014 9:36 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 17, 2014 10:47 am     Reply with quote

USP Embarassed

Is there some CCS way to configure that, or is it the way I use now?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 17, 2014 11:05 am     Reply with quote

Use #byte and #bit statements as you did, or as shown in the post below:
http://www.ccsinfo.com/forum/viewtopic.php?t=47428&start=7
Ttelmah



Joined: 11 Mar 2010
Posts: 19447

View user's profile Send private message

PostPosted: Mon Mar 17, 2014 12:04 pm     Reply with quote

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
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