Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Will a PIC output latch maintain its value if the port is swiched to input?
I.e. if I write 1 to GP0 and then swich it to input to read the port and then swich it to output again, will the port still be 1?
Yes, with a qualifier. If you use any instructions on the port that are known to cause the R-M-W (read-modify-write) problem, like bcf and bsf, the GP0 output latch may get set to whatever value the GP0 input is at.
a while back i post something on the PicBasic forum. It's working good and cheap. Certainely not the best way but for your own and personnal use it should be good enough.
Use it to your own risk and all the usual disclaimer stuff
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.