On 6 December 2013 12:00, Dwayne Reid wrote: > You are close to what I am talking about but missed the mark just a bit: > I set the pin to o/p, write that pin to being LO, then turn the pin > back to i/p and *read* a logic HI on the pin. Question: what state > is the pin output latch in now? > You mean you are turning the TRIS to read before the latch can store the new state? Tamas > > My recollection is that the pin is read in the quadrature clock phase > Q1 or Q2 and the pin latch is written in Q3 or Q4. > > dwayne > > > >Matt Pobursky > >Maximum Performance Systems > > > >On Fri, 06 Dec 2013 11:19:43 -0700, Dwayne Reid wrote: > > > Good day to all. > > > > > > I've been a long-time PIC programmer and thought that I knew all ther= e > > > was in regards to Read-Modify-Write issues with early PICs (12-bit an= d > 14- > > > bit core devices). But I'm doing a re-write of an old project and ra= n > > > into a question that I don't have an answer for. > > > > > > The situation is this: PIC pin is set as output and is low. Now I tu= rn > > > the pin into an input and read the level on the pin. This level migh= t > be > > > HI or LO. Now I turn the pin back into being an output. > > > > > > Question is: what is the (output) level on the PIC pin *if* the level > had > > > been HI when the pin was read? > > > > > > In other words, pin output latch used to contain a logic LO. The pin > was > > > turned into an input and read a logic HI. Does the pin output latch > > > update to reflect the level that was read when the pin was an input? > > > > > > My gut says that the pin output latch *does* change from LO to HI. > > > > > > Any thoughts? > > > > > > dwayne > > > -- > Dwayne Reid > Trinity Electronics Systems Ltd Edmonton, AB, CANADA > (780) 489-3199 voice (780) 487-6397 fax > www.trinity-electronics.com > Custom Electronics Design and Manufacturing > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .