On Monday 01 September 2003 10:50, Olin Lathrop scribbled: > > Nope. I can't. The RB outputs here control the columns of 7-seg LED > > displays, which is why they go to the MOSFET gates. If I just shorte= d a > > switch between an RB output and ground, then the output will be force= d > > low all the time when the switch is pressed. > > I didn't realize the B ports were the outputs and the A port the input. > In that case the mechanical switch is fine. > > However, the NPN should be a PNP with emitter to the RB line, collector= to > the RA line, and base to the level being sensed via a 10Kohm or so > resistor. The transistor can pull the RA line high only when its RB li= ne > is high. This does invert the logic for sensing the line from the way = you > had it, but that's a minor software change. Correct. I've got it to work now with the NPN, but intend to change it t= o=20 PNP, now that I know why it should be so. The software change is indeed=20 minimal. Cheers, -Neil. --- [This E-mail scanned for viruses] -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.