I can't figure out what is going on in the code below. I'm trying to talk to a
24FC512 EEPROM. I can't get anything to work. Pull ups on SCL and SDA are
2.2K. This signals look great on an analog scope.
The output from my MCC I2C analyzer is below the code segment.
I'm using PBP2.6, processor is 18F8723@40Mhz.
What am I doing wrong?
Code:
DEFINE I2C_SLOW 1
...
EEAddr = %10101010
TOPP:
For XX = 0 to 255 ; XX is a WORD variable
Y = $AA ; Y is a BYTE variable
; EEAddr is a BYTE variable
I2CWRITE PortD.6,PortD.5,EEAddr,XX,[Y]
pause 10
next XX
pause 1000
goto topp
Msg 1017 [Start]#AA[W][Stop]
Msg 1018 [Start]#A0[W]AA[Stop]
Msg 1019 [Start]#AA[W][Stop]
Msg 1020 [Start]#A0[W]AA[Stop]
Msg 1021 [Start]#AA[W][Stop]
Msg 1022 [Start]#A2[W][Stop]
Msg 1023 [Start]#AA[W][Stop]
Msg 1024 [Start]#A2[W][Stop]
Msg 1025 [Start]#AA[W][Stop]
Msg 1026 [Start]#A4[W][Stop]
Msg 1027 [Start]#AA[W][Stop]
Msg 1028 [Start]#A4[W][Stop]
Msg 1029 [Start]#AA[W][Stop]
Msg 1030 [Start]#A6[W][Stop]
Msg 1031 [Start]#AA[W][Stop]
Msg 1032 [Start]#A6[W][Stop]
Bookmarks