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

PIC pin assignments

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



Joined: 18 Oct 2006
Posts: 9

View user's profile Send private message

PIC pin assignments
PostPosted: Wed Oct 25, 2006 10:21 pm     Reply with quote

I have a PIC16F877A chip and I was wondering if all the pins on the right side of the micro can be used if all I need is to read low and high values from a source.

All I really need to do is compare some values that Im reading from some pins and output either a low or a high on the output pins.

Im using all the pins (but power pins) from the right hand side of the micro, starting from B7 to D2. For example B3/PGM, C7/RX/DT, will this be a problem when I try to input values or output them? Are the PGM, RX, DT etc..., commands that will take effect if you initialize that pin in the source? for example, if I dont initialize CCP1 then I could use C1 as a regular pin?

Sorry for my stupidity, but im new to programming these chips.

TIA!
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Wed Oct 25, 2006 10:46 pm     Reply with quote

Look in the datasheet at the tables that show the ports. That will tell you all the options for each pin.

Typically, the minimum to get things started will be power, ground, MCLR, (OSC1 & OSC2 if you don't use the internal oscillator and rely on an external crystal.) Otherwise most of the pins can be used as Input or Output. Some have an Open Drain only pin or two but you will see that in those tables. You can also change many of the settings at run time in you code.

Good luck,

John
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