This on more or less only depending on the capacitans as-seen by the pin. Under the circumstances as you describe, the pin should well have switched before the "next instruction" at any speed on a PIC. RA4 is a special case that you might want to test a little more. The value of the resistor might have some influence... Jan-Erik. jtroxas wrote: > How Fast can a typical PORT Pin of a PIC Micro Switch from Low to High or > vice versa... assuming the wire its connected to is short( maybe a few > inches) and connected to another PIC Micro PIn... > > i.e. if a Pin is Initially Low... and if I switch the PIN high and set it to > Input immediately.. and read it back in the next instruction.. Will I be > able to read the expected high level 1... > > further more say its RA4 Pin with a Pull up resistor.. to turn it Low you > clear TRISA4.. then In the next Instruction I turn the PIN high by setting > TRISA4 to 1 making it an input.. and read it back immediately in the next > instruction.. Will you I be able to read the expected Input which is a 1??? > say if I was running the PIC at 40MHZ.. > > At what speed should I be watchfull??? > This on more or less only depending on the capacitans as-seen by the pin. Under the circumstances as you describe, the pin should well have switched before the "next instruction" at any speed on a PIC. RA4 is a special case that you might want to test a little more. The value of the resistor might have some influence... Now, an extra NOP here and there isn't that bad either, if you have the available time for that. Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist