Hi
  I am looking for easy way to read 8 bits of data that is transmitted on 12c bus
 i have tried to btfss on data and clock pins looking first for start bit then testing next 8 data bits
then putting bits info into a temp reg
ie
   
Pic 12c508_
   bitstart_
                    btfss          gpio,1                                  ;clock high test
                    goto           bitstart_
                    nop
                    nop 
 r_                 
                    btfss          gpio,2                                  ;data high test
                    goto           r_
                    nop
                    nop
r1_
                    btfsc          gpio,2                                   ;data low test
                    goto           r1_
                    nop
                    nop
r2_
                    btfsc          gpio,1                                   ;clock low test      
                    goto           r2_
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;                                                         
                    movlw        8                                            ;8 bit count reg
                    movwf       count
 testbit_
                    btfsc         gpio,1                                      ;clock pin on eeprom    
                    goto         testbit_
 ti_   
                    btfss         gpio,1
                    goto          ti_ 
                    btfss       gpio,2                                      ;data pin on eeprom         
                    goto         testbit_
                    bsf           temp,0
                    rlf              temp
                    decfsz     count    
                    goto         testbit_
 
then reading temp reg with ice pic emulator
but it wont work i get wrong hex
any one now whats wrong??
 
thanks