Hello.
I decided to give it another try, now with this module.
https://www.elecrow.com/i2c-eeprom-m...256-p-736.html
Pull up resistors installed, and following code configured.
when properly working, it should produce chirp up, chirp down sound. But it does not
of course, chirp up - write, works fine, because here it chirps directly, but in read routine
I'm getting zeros.
Only what I've found out, that if I set read address to 160 (A0) it returns 255, for any other address, it returns 0.
So somehow, chip responds, right? but not completely.
What I'm missing?
Code:
x var byte
y var byte
z var byte
sda var portb.1
scl var portb.0
ehmo:
for X=0 to 12
I2CWrite sda, scl, 160, x, [x]
hpwm 1,127,1000+x*10
pause 1
next
hpwm 1,0,1000 'mute
pause 500
for x=12 to 0 step -1
i2cread sda, scl, 160,x,[y]
hpwm 1,127,1000+Y*10
pause 1
next
hpwm 1,0,1000
pause 500
goto ehmo
Bookmarks