'This code will shift out a byte bit by bit to any pin you want. 'Shifting is left (MSB first) to have a right shift (LSB first) 'change b0=b0*2 to b0=b0/2. 'NOTE: Make sure the pin used has been set to OUTPUT. 'Shift WORD; B0 can be substituted for W0 & the for loop 1 to 16 dirs=%00000001 'set pin 0 to output b0=%11001011 'just load b0 w/test value for b1 = 1 to 8 pin0 = bit7 b0=b0*2 next b1 'To shift in a byte bit by bit. This will shift the condition 'of pin# into the b0 register. for b1 = 1 to 8 b0=b0 *2 +pin# next b1