I am using a register for looping, but I don't have a clue how to acces portb,X where X is the variable. BTW, im using 100% asm On 5/26/05, Spehro Pefhany wrote: > 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 > -- Dave All us base are belong to you. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist