On Wed, Jul 29, 2009 at 1:26 PM, M.L. wrote: > On Wed, Jul 29, 2009 at 12:56 PM, Steve Smith wrote: >> best I can do is 5... Anybody got any better ideas I am trying to get a one >> chip solution in the smallest possible space and it needs a comparator >> > > movlw output_bit > xorwf gpio,f > btfss gpio,input_pin > goto $-2 > > -- > Martin K. > Will probably make a read/modify/write problem I believe. possibly add a nop between xorwf and btfss. Will still be fewer cycles. Remember that a goto is 2 cycles not 1. Other variations are possible. The better solution is to use a PIC with interrupts and a timer, or more than one PIC. -- Martin K. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist