Hey, Peter ! October 8 2002 , you wrote: PB> void send(BYTE word) PB> { PB> int i; PB> for(i = 7; i >= 0; i--) /* shift out msb first to lsb*/ PB> { PB> DATA = word & (i); /* put but i on the data outputpin */ if you want to shift then you must do it like this: word <<=1 // shift one bit right or word >>=1 // shift one bit left using this,your FOR should look like this: for(i=0;i<7;i++) { DATA = ((word & 0x80)!=0) // 0x80 = 0b10000000 // bit is logic data type,so we use != word <<= 1; // shift one bit left; CLK = 1; DelayMs(5); CLK = 0; DelayMs(5); } PB> CLK = 1; /* clock it out to the seriell_in/parallell out shiftregister */ PB> DelayMs(5); PB> CLK = 0; DelayMs(5) again :) PB> } PB> /* Its now out on the shiftreg */ Best regards, Yura mailto:yura_boy@mail.ru -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads