Hello Atomski,

A>>I did. But I still get %01001000 instead of %00100100.
Is there a way to mask my Rx_Byte variable with $FF i.e.
%11111111 and find only zeroes returned by Rx_Bit and
fill them in in the right places? Or should I just use one
extra statement Rx_Byte = Rx_Byte >> 1 at the end of
my w loop? This seems to be the easier way out, but it
looks dumb. Any suggestions?<<

If it works, it works <g>. You are messin with 6 instead of 8 bits... Thus yes... you can shift over two places. Just put a comment by it, and say "Shifty Personality problem".

there are other ways to handle it, but...<g>



to right justify, you can do two shifty's and the Begining (before reading code).

Since I do not know what you are trying to accomplish, I do not know how to fully answer your question.

Steve (Mister_e) had some good looking code for you too.

Another way to accomplish without that extra shift, is to do the following:
PsuedoCode:

RxByte=FF
for Loop=1 to 6
Pulse=Portxyz
RxByte.2=Pulse
RxByte=RxByte<<1
next Loop;

Now if you want to shift to the right
RxByte=RxByte>>2