Do you use macros in your assembly program to get around the fact that you shouldn't be using read-modify-write commands on a port? I wrote two macros that should accomplish this: setb macro port, pin movff port,portbuf bsf portbuf, pin movff portbuf, port endm clrb macro port, pin movff port,portbuf bcf portbuf, pin movff portbuf, port endm Simple, right? They don't work right. If I do this: setb PORTB,0 setb PORTB,1 nop clrb PORTB,0 clrb PORTB,1 Pin 0 is set then goes low while pin 1 goes high, then pin 1 goes low - so it looks like the second "setb" doesn't occur until pin 0 is cleared. The pulses don't overlap at all. Do you know what the problem is? - Martin -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist