> I'm getting a little bit of this. But I don't quite understand the > circuit behind this pin (RA4), but I think it's because I don't > know anything about the circuit behind the other pins either You can think of the output stage of a logic gate (or a microprocessor pin) as a set of switches. Normally, there is one "switch" connected to V+, and one connected to GND. If the output produces a logic "high" state, the switch to V+ is closed and the switch to GND is open. For logic "low", the switch to GND is closed and the switch to V+ is open. The exact nature of the "switches" determines the exact values of the output voltage and available current in each state. Normally, both switches are never closed at the same time (but the fact that they'll probably be both partially on at some point during transitions accounts for the power supply spikes and need for bypass caps, along with other phenomena.) Some output stages permit both switches to be turned off at the same time. This is the 'tri-stated' output, where that gate isn't driving that output pin/signal at all, leaving it free to be driven by other gates that might be connected (also, pins that can be designated as inputs will typically have their output stages tri-stated when they're set to be inputs.) Other output stages are missing one of the switches (usually, the one to V+) These are called "open collector" or "open drain", based on the internal circuitry (OC if there are bipolar transistors, OD for MOS transistors.) These outputs can only be switched to ground, or left disconnected. There are a couple of advantages to this: 1) Many gates like this can be connected externally, with an external resistor acting as a "pull up" to V+. The external signal will go to ground if ANY ONE of the gates switches to GND, allowing you to implement buses and "wired or" configurations. These were pretty common in pre-cmos days (the pdp11 unibus and qbus were "open collector" buses, I think.) I gather that making a tri-state output with the processes used by (eg) TTL logic was a bit difficult. 2) You can take the die space that would have been used by the other switch of your output driver, and make the switch to ground bigger, instead, so that it can "sink" larger currents. 3) You can use the pin as an input at the same time, WITHOUT needing to disable the output state. You set the output "high" (no swicthes on), and an input connected to the same pin will see HIGH or LOW depending on what external circuitry sends to the pin. (On some micros, this is as close to bidirection IO as you get. See the 8051 family.) I thnk there's a couple others, but they don't come to mind at the moment. BillW -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.