OSCCON changed to set 4MHz, internal oscillator.
I2CSLOW 1 stays commented
I2CHOLD 1 stays commented
No LuckCode:LED Var PortC.0 Value Var Byte Addr Var Byte Loc Var Byte '--------------------------------------------------------- Pause 500 DEBUG "Start......",13,10 Value=0 Addr=$9B 'Tried $3B,$5B Loc=0 Main: High Led : Pause 500: Low Led : PAUSE 500 I2CWRITE SDA,SCL,ADDR,LOC Addr=$1B I2CREAD SDA,SCL,ADDR,LOC,[VALUE],Fail PAUSE 25 DEBUG HEX Value,13,10 PAUSE 250 DEBUG "Done....",13,10 WHILE 1 : WEND Goto Main Fail: toggle portc.2 goto main
> It is bit 7 for R/W (Slave address + write bit)






Bookmarks