Hi Melanie, still on board, super ! and working on Sunday time !
Aratti .. sorry, I didn't see the word GOTO ...thanks ..
It is clear for me, that the control and address parameters are confusing for me ...
I understand from the example, this is used with Eprom familly
Control parameter is the main address
and
address parametre is used to point to the address location in the Eprom !
I use for long time I2C commands in the simple way like
I2CWRITE DataPin,ClockPin,Control,{Address,}[Value{,Value...}]{,Label}
example :
datapin var PORTA.1
clockpin var PORTA.2
Main:
I2CWRITE datapin,clockpin,$C2,[11,22,33,44],errorI2C
etc ...
etc ...
errorI2C:
flash a led ....
goto Main
As I do not understand Control and address story, I always use this and It works
with a lot of synthetisers (SP5055 familly)
Now I decided to be more serious ! and check the frequency lock flag
(bit 6 of the SP 5055 register)
that why I try to READ like that
flag var byte
I2CREAD datapin,clockpin,$C3, [flag], errorI2C
if flag.6 = 1 then continue
else
goto main
endif
continue:
etc ...
etc ...
nb: $C2 or $C3 I am not sure, but I can check the good value ..
thanks for your help




Bookmarks