Yes, I think that is the perfect solution. Sergio's code is good but the same number of instructions. Using Wouter's idea of the comparator I can use the same code I always used, but save an external inverter by using the internal comparator. Thanks to everyone! Best regards, Bob On Sun, Jan 15, 2012, at 12:03 PM, Kerry Wentworth wrote: > I don't see the downside of Wouter's suggestion of using a voltage=20 > comparator. > Output the bit on A0, which is connected to A1. > Set comparator1 to compare the voltage on A1 to 2.5V from the voltage=20 > reference. > Output comparator 1 results to A3. > A3 will always the the inversion of A0. > Why wouldn't that do what you want? >=20 > Kerry >=20 >=20 >=20 > Bob Blick wrote: > > I have an existing small PIC project that produces an output on one pin > > based on the high bit of a register. In order to save an external > > inverter, I'd like to also output the complement on another pin. For th= e > > sake of argument let's say it is an oscillator that blinks an LED or > > drives a transducer. > > > > The target is a 16F627A and any pins are fair game, but glitches are no= t > > OK to the two pins, so no math or rotates directly on the ports. > > > > It is OK to do anything to any of the other pins. > > > > It is OK for there to be a little latency, and either port A or port B > > is OK. Or even both ports, though I don't see how that could get any > > faster. > > > > Here's the fastest thing I could come up with: > > > > movlw 0x55 > > btfss bigreg,7 > > movlw 0xAA > > movwf PORTA > > > > This is almost fast enough, if I could shave an instruction off one of > > the two conditions it would be enough for me. > > > > Any suggestions? > > > > Thanks, Bob --=20 http://www.fastmail.fm - The professional email service --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .