|
|
View previous topic :: View next topic |
Author |
Message |
xcamarox
Joined: 18 Oct 2006 Posts: 9
|
PIC pin assignments |
Posted: Wed Oct 25, 2006 10:21 pm |
|
|
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
|
|
Posted: Wed Oct 25, 2006 10:46 pm |
|
|
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 |
|
|
|
|
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
|