On Thu, 31 Dec 1998 09:10:29 +1000 Geoff Thornton writes: >Dmitry, > Thanks. But that is not really what I'm after you see, I want >the port to >set the output to what was read after the last read of the port when >it was >an input and I was hoping the bit test commands would do this, can you >please advise. The bit test commands don't change the port's output latch. Only instructions with a destination of "f" (including bsf and bcf) do. The easiest way to do what you are talking about would be movf PORTB,f This reads all the pins of the port and sets the output latch to the value read. Changing the port pins from input to output or vice versa by writng the TRIS register doesn't change the output latch. So the pins that are newly made outputs will immediately output the level set by the output latch. I'm fairly sure that nothing changes the output latch value other than software writes to the port register or turning the power off. ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com/getjuno.html or call Juno at (800) 654-JUNO [654-5866]