Mcgee, Mark wrote : > > No, the PIC output is drives activily both high and low, so > > no need for any pullup/down res. > That's good news. Is this documented anywhere do you know? > It's not that I doubt you, it's just that I couldn't find anything > like that in the data sheet. It's there... (Chap 5.0 "I/O PORTS") > > > Q3) I am using RA2,RA3,RA4 as inputs from 2 control lines and > > > a toggle switch. > > > Shall I just hook them up to the inputs? > > > > Yes, you could, but it also depends on the environment > > where this design is to be used. > Like what? My project is going to run at ambient temperature > in a garage, controlling a refrigerator or heater to control the > temperature of beer fermentation. Could have been in a car, or at the Northpole, you never said... :-) > > > > > > Do I need pull-up/pull-down resistors? > > > > If switch connects to 0V, you need pullup resistor. > > If switch connects to 5V, you need pulldown resistor. > ok, yes, makes sense. The switch is connected to +5v, so a > pulldown resistor - will 100k be about right? Again, depends on the environment. If very electricaly "unclean", a lower value would probaly be better, 10 or 47 kohm maybe. And, it's usualy more common to connect the switch to GND and use a pullup resistor. > > > > Looks like PORTA pins can sink 25mA, so that's 5/0.25=20R, right? > > > > Only *output* ports can source or sink *any* current. > > Input ports just "monitors/sense" the level on the pin. > Oh. I thought source was for output, and sink was for input. > Can you explain the difference to me? "Sourcing current" is when an *output* pin is high and current flows *out* from the pin through a load to GND. "Sinking current" is when an *output* pin is low and current flows from (eg.) +5V through a load *into* the pin. But in this case you was talking about an *input* pin, not ? Input pins never either source or sink any current. Best Reagrds, Jan-Erik. _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist