Hi, > OK, basically, the program ... > What program? Maybe you remember the context of successive messages about > your project, but the rest of us have lots of other stuff going on, and > you're project isn't high up on the priority list. If you expect help from > others, you need to make it easy for them. No, I'm not going to dig thru > the archives just to answer a PIClist question. Quote the relevant parts > of > what you are replying to and snip the rest. This has been said many times > here, and should be self-evident from common sense anyway. > Sorry, I'm used to gmail keeping things in threads for me. I also thought that I had quoted the relevant parts. I'll rephrase my question... I am writing a program which receives serial data and manipulates portb depending on what is received. The pic uses RA6=low to signal that it is ready to receive the next data byte. The interrupt handler raises RA6 when a byte is received, the main loop checks the UARTs 'transmission received' flag (PIR,5). This flag never seems to get set. If I raise a flag in the interrupt handler, then it works ok, but why doesn't checking PIR,5 work? If i include the code, would that be helpful? a little more detailed description is below... Thanks Nick Initially, RA6 is low. The main loop waits for a byte to be received*. Once this happens, it can read the byte out of RCREG and then set RA6=low. This lets the sender know that it can send another byte if it wants. the pic then goes off and manipulates portb, which involves delays and things. When a byte is received, the interrupt handler sets RA6=high, to signal to the sender not to send anything else until the main loop is ready for it. * if the main loop detects a byte having arrived by checking a flag set in the interrupt handler, it works. if the main loop detects a byte having arrived by looking at PIR,5 it doesn't work. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist