Hi, yeah, sorry, RA6 is an output, but i was using it as in internal flag too. just tried with a normal flag which isn't an output pin and it seems to work. This leads me to a further question... Why can't I just check UARTs own 'transfer complete' flag (PIR,5)? The interrupt service routine doesn't touch RCREG, so PIR,5 should stay set. The main loop can wait for this flag and then read RCREG. What I think i'm seeing is that the main loop never sees PIR,5 get set, thus PORTA,6 never goes low. pseudocode is now: interrupt handler: set PORTA,6 high //tell sender to stop sending retfie main loop: if PIR,6 is low: //keep waiting goto main loop else: read RCREG set PORTA,6 low //do something with it goto main loop end Thanks for your help Nick PS. yes, i have remembered to set PORTA,6-7 as I/O rather than OSC Olin Lathrop wrote: > Nick Hale wrote: >> I'm, trying to do flow control, using PORTA,6 to signal that the pic >> is ready to recieve data. >> >> pseudocode is: >> >> interrupt handler: >> set PORTA,6 high >> retfie >> >> main loop: //wait for interrupt handler >> if PORTA,6 is low > > I'm confused. Is RB6 a input or output? Are you using it as a > internal flag or is it communicating with a external device. Your > pseudo code above seems to be inconsistant with itself. Sorry, I just realized I said RB6 when I meant RA6. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist