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

set_tris question

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







set_tris question
PostPosted: Sat Aug 19, 2006 11:25 am     Reply with quote

Hello, I'm making a driver and was wondering if the following is possible.

I have a particluar I/O pin (VPP) defined as:

#byte PORTD = 8
#bit VPP=PORTD.6

Is there a way in the function to modify the tris reg of VPP having only been passed VPP?

I know that on this device the port is in bank 0 and the tris is at the same location in bank 1. Something to the effect of:
VPP + 0x80 = 1 to make it an input
VPP + 0x80 = 0 to make it an output

Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 19, 2006 12:10 pm     Reply with quote

The code shown in the links in this thread, tells how to do it.
http://www.ccsinfo.com/forum/viewtopic.php?t=27923&highlight=16f+18f
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