At 07:48 PM 5/26/2005 +0100, you wrote: >I did actually see that example earlier, but I decided to make my own, >as I need it to be as quick as possible, because I am also running >some other timing critical functions, like strobing 3 7seg led >displays. Why don't you unroll the loop and access the bits directly? (more code memory required, but faster) Or perhaps you could use a register for the loop counter like this for (m=0x01; (m & 0xFF)!=0; m<<=1) { ... } Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist