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

pic24 series 12 or 15 pin tris setting or pin calibration ?

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



Joined: 27 Apr 2012
Posts: 15
Location: TURKEY

View user's profile Send private message

pic24 series 12 or 15 pin tris setting or pin calibration ?
PostPosted: Wed Aug 01, 2012 2:36 am     Reply with quote

hi. pic 24 series has got more than 8 pins(11 or 15).for example PIC24HJ32GP202 b port b1 b2...........b11 b12 b13. how can set tris pin b11 or b13 ?

b 11 for input => set_tris_b(0x0800); or
b13 for input => set_tris_b(0x2000);

is it true?
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Wed Aug 01, 2012 2:57 am     Reply with quote

Have you tried reading the manual?.

Quote:
"Parameters:
value is an 16 bit int with each bit representing a bit of the I/O port."

_16bit int_.
bolubeyi



Joined: 27 Apr 2012
Posts: 15
Location: TURKEY

View user's profile Send private message

PostPosted: Wed Aug 01, 2012 3:34 am     Reply with quote

i am sorry but can you give me an example?
andyfraser



Joined: 04 May 2004
Posts: 47
Location: UK

View user's profile Send private message

PostPosted: Wed Aug 01, 2012 6:24 am     Reply with quote

You gave 'us' an example in your first post Very Happy
bolubeyi



Joined: 27 Apr 2012
Posts: 15
Location: TURKEY

View user's profile Send private message

PostPosted: Wed Aug 01, 2012 7:32 am     Reply with quote

but i am not sure,is it true? Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Wed Aug 01, 2012 7:44 am     Reply with quote

Yes.

If you are having trouble, then :

What other peripherals are on the pins?. Sometimes things may need to be turned off or moved, before normal I/O operation will work.
On RB11, JTAG is normally here if I remember correctly - so this needs to be turned off in the fuses. Also the parallel master port uses some pins round here.
Remember that TRIS _will_ be automatically overridden by the compiler. If (for instance) you perform a TRIS operation selecting a pin as an input, then write something to the port, that TRIS will be cancelled. Fixed_io, or fast_io allow this behaviour to be controlled.

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