> Apparently if you have an interrupt on the tmr0 overflow active, in my > case this interrupt is updating the data in a 4511 and driving 4 > transistors for a 4 digit LED display, then outputs on the PortB will > not latch when the interrupt is running. By disabling the interrupt and > blanking my display in code I was able to get the portb,5 port to latch > it's output for my purpose. > > I guess you learn something everyday. Er.....You may be forming a misconception here. That doesn't sound quite right to me. I'm a little confused on your statement, but let's see. Are you saying that when you were writing to PortB in the interrupt routine that it was somehow not "sticking", but at main level it works? It sounds to me like maybe you were writing to the TRISB register when you meant to be writing to PortB. If inside your interrupt routine, you were not ensuring that you were in Bank0 (by specifically switching to it) you may have been entering the interrupt while temporarily switched to Bank1 at main level. Generally speaking, an interrupt can occur between any two instructions. This is a big "gotcha" when using PIC's and interrupts. Much of your ISR would work normally, but writing to PortB would really be writing to TRISB, and trying to set the pin, would in reality switch the pin to input mode (effectively turning off your relay). michael brown -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body