which you will probably be doing if you are doing I2C. ----- Original Message ----- From: "Michael Rigby-Jones" To: Sent: Monday, March 19, 2001 10:00 AM Subject: Re: [PIC]: I2C pullups > > -----Original Message----- > > From: Kevin Blain [SMTP:kevinb@WOODANDDOUGLAS.CO.UK] > > Sent: Monday, March 19, 2001 9:24 AM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Re: [PIC]: I2C pullups > > > > When you TRIS a pin as input, then read it, does that not put a logic 1 in > > the PORT register if the pin is pulled up? If so, when the pin is TRIS'd > > to > > output again, it will be outputting logic 1.?? > > > The port latch is only changed if a Write or Read Modify Write instruction > is executed on the port. So if a pin is set as an input, and then a BSF/BCF > etc is performed on the port, the port latch for that pin will be set to > whatever state the pin is at. This won't happen by simply reading the state > of the port however. > > Regards > > Mike > > > > Therefore, care should be taken when doing I2C in this method to make sure > > that the pin is set to output 0 whenever you tris back to an output. > > > > Regards, Kevin. > > > > -- > > http://www.piclist.com hint: The list server can filter out subtopics > > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > > > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics