explanation on I2C command (PBP)
hello
In the ONLINE help I found the I2C command explanation, see below
I2CWRITE DataPin,ClockPin,Control,{Address,}[Value{,Value...}]{,Label}
I2CWRITE sends Control and optional Address out the I2C ClockPin and DataPin followed by Value.
Questions :
1/ what is the meaning of CONTROL ? for me an I2C device as
a one byte adress (let's say 00 to FF) control is optional in this case ?
2/ what the meaning of LABEL, I mean goto this label on which state or result
if command well done or in case of error (I suppose error case )
I didn't find any explanation on thoses terme.
thanks in advance
F1CHF Francois
explanation on I2C command
well well Thanks Melanie for your nice and quick answer (as usual !)
may I come back on the control and adress parameters
I understand :
CONTROL is the physical adress of the I2C slave as you said $A0 to $AE for the 24LC64
ADRESS is an optional parameter (in this case a memory location in this eeprom) this parameter is a BYTE so the maximal value is $FF (dec 256)
and the 24LC64 need a 12 bits adress regarding the size.
It is not the case for a SP5055 or PCF8574 which have only ADRESS and
two bytes of data .... in this case parameter adress is ignored ?
I2Cwrite sda,scl, @I2C,[data1, data2], error routine label
Am I right ?, or still "swiming in the marmelade ?"
last sentence is a French translation .. hi ! like me ...
so , sorry for my possible bad translation or writing.
regards,
Francois
Re: explanation on I2C command (PBP)
Melanie
I am having a time with the RDA1846, the data sheets says the 7 bit control address is 1110001 plus a read/write bit does I2CWRITE add this read/write bit in the proper place or do I need add it to the control address? It also says it should be sent MSB first is this how I2CWRITE handles this control byte? I am very confused !
ADDRESS VAR BYTE
DATAH VAR BYTE
DATAL VAR BYTE
I2CWRITE DATAIO,CLOCK,%1110001,ADDRESS,[DATAH,DATAL]
Thanks You!
https://dallasmakerspace.org/w/image...ing_manual.pdf "Page 5"