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

pin_select again

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



Joined: 26 Nov 2008
Posts: 8

View user's profile Send private message

pin_select again
PostPosted: Mon Jan 16, 2023 9:21 am     Reply with quote

If the pic is setup for dynamically changing the PPS and you set pin_select("U1RX", PIN_B12, TRUE, FALSE); for instance. I want to make this pin a digital pin again. How do you undo this dynamically?

any help would be appreciated
temtronic



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

View user's profile Send private message

PostPosted: Mon Jan 16, 2023 9:30 am     Reply with quote

Which PIC ?

I was under the impression 1st gen PPS were selected once, not 'dynamic'...
edit...
found a paper on PPS by microchip....

OK ,seems as long as you do NOT 'lock' the PPS 'control register lock', you CAN 'dynamically' ( change in run time ), the pins.
Hopefully there's a few 'barriers' to prevent coding errors from changing PPS for you !


Last edited by temtronic on Mon Jan 16, 2023 9:56 am; edited 1 time in total
gaugeguy



Joined: 05 Apr 2011
Posts: 286

View user's profile Send private message

PostPosted: Mon Jan 16, 2023 9:31 am     Reply with quote

This depends greatly on which processor is being used, but "NULL" should be the output function for standard digital.
The output function list is in the processor header file.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Mon Jan 16, 2023 10:41 am     Reply with quote

Two things. As Gaugeguy says selecting to NULL turns it off, but you also
must have NOPPS1WAY selected, otherwise the selection can only ever
be done once.
How you use NULL is shown at the end of this thread:
[url]
http://www.ccsinfo.com/forum/viewtopic.php?t=58619&highlight=pinselect+null
[/url]
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