hserout ["Address scannining in progress..."]
for I = $08 to $77 step 2
I2CWrite SDA,SCL,I2C_Dev,[DC] ;Address scannining in progress.. yet you never change the address,, DC is used but never initialised
If Flag_Ack = true then say = I ; how would Flag_Ack ever change
pause 2000
Led = !Led
Next I
hserout ["Address found = ",dec say]
ps
internal pbp regbit FLAGS.5 may act like you want Flag_Ack to , but its undocumented and may not be totally reliable
try this
Code:
dc=0
hserout ["Address scannining in progress..."]
for I = $02 to $fe step 2
I2CWrite SDA,I,[DC],nak
hserout ["Address found = ",hex2 I ,13,10]
nak:
Next I
Bookmarks