Thanks Quentin but it still wont work im am using 12508 pic,pin 5 for data pin 6 for clock.. 1-- when i use status,c mplab gives error should this be status,0 what i want to do is to look at an 8 bit data word on pin 5 (standerd i2c bus ) test to see if it is hi or low then, put the same value into the reg i named temp i used the adapted code you sent but i still cant get the same value into temp reg as i am sending into pin 5 off pic it looks like my problem is that i am testing for hi,low bit then moving temp reg to left (rlf) this i am doing 8 times the last bit test takes me into carry bit of temp reg (12c508 has 8 bits in reg and carrybit) so if first bit was logic 1 then and last bit is logic 0 the code then makes carry bit 0 so i loose a logic 1 bit,see what i meen?? i have worked this out on paper and i think the 8 bit value left in temp reg needs to be reversed this is fine if first data bit is not logic 1,then i DO get the right value i now the code i am sending to pic is fine(i wrote it for a nother project and it works fine) please please help its driving me mad.. thanks