Some PICs have a TRIS instruction. You load a bitmask into the W register then say, for example "TRIS PORTA". Other PICs have SFR's called TRISA, TRISB, etc. These are often in bank 1. Some PICs even allow both the TRIS instruction and the use of the TRIS registers. Pins corresponding to zeros in the bitmask become outputs. Those corresponding to ones become inputs. The inputs are effectively tri-stated because they are no longer driving the pin. This allows an external device to drive the pin instead. Note that Microchip has deprecated the use of the TRIS instruction on those chips that also support the TRISx SFR's. This is because the 'wave-of-the-future' is the SFR-only way. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: Graham North To: Sent: Thursday, September 07, 2000 3:44 AM Subject: [PIC]: tri-state Pic pin, how? > Hi all, > > I've read a lot about making/leaving pic pins tri-state for one reason or > another lately, but I don't know how to do it! Can it be done on all pics, > or just a few? I have mainly use 16F84, 12C508 and 17C43. When reading I > do agree with some of the benefits, and so would like to try it. > > Could someone enlighten me? > > Regards > Graham North > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST