Try this one and post result
regardsCode:CMCON=7 ;disable internal comparator TRISIO=0 ;set pins to outputs LED1 VAR GPIO.5 ;define GP5 as LED1 LED2 VAR GPIO.4 ;define GP4 as LED2 cont var byte ;variable for control word of eeprom value var byte cont=$A0 ;control word of eeprom value=3 I2CWrite GPIO.0,GPIO.1,cont,1,[value] pause 20 I2CRead GPIO.0,GPIO.1,cont,1,[value] pause 20 if value=3 then LED1=1 LED2=0 else LED2=1 LED1=0 endif End
Bookmarks