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 CCS Technical Support

PortC

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



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PortC
PostPosted: Tue Mar 19, 2013 11:36 pm     Reply with quote

I'm using PIC18F2455. I need to use almost all pins. I'm having some problem with PORTC. I need them to be Digital I/O. How do I set the Port to be Digital I/O in the fuses line ??
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 19, 2013 11:59 pm     Reply with quote

They can't be output pins. They can be input pins, if you use the
method shown in the sample code in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=48742
amjad_alahdal



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PostPosted: Wed Mar 20, 2013 12:04 am     Reply with quote

Sure ?
Because, I have tried to set some inputs and outputs. Some worked as outputs. It's just I can't use them all
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 20, 2013 12:24 am     Reply with quote

I assumed you had already tested all the pins on PortC and found that
pins C4 and C5 don't work as digital pins after the PIC is powered up
initially. And then, they can only be programmed to be input-only pins.
That's what I'm talking about in my post (pins C4 and C5).
amjad_alahdal



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PostPosted: Wed Mar 20, 2013 12:35 am     Reply with quote

Ok thanks.
I will give it a try. Indeed, I need to use 4 pins as outputs and 3 as inputs. I'll modify the connection the way you said. And I'm going to use C4 and C5 as inputs and C6 as well. The rest will be outputs. I'll post the result.
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Wed Mar 20, 2013 3:16 am     Reply with quote

Seriously, just read the data sheet.....

If you look at table 1-2, and read what it says for each port pin here, it tells you exactly 'what' the chip's pins can do. Look at the 'pin type' column, against each pin.
So pin RC0, is listed as I/O, 'digital I/O', while pin RC4, is listed as I, 'digital input'. The manufacturer can't be much clearer than this....
The same for RC5.

You are not going to get very far in electronics, if you can't take a 'hint' as strong as this one!......

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