Data Sheet

CoreDeviceInterfaceSpecifications ModernRobotics Inc
Page5of10
ModernRoboticsCoreDeviceInterface
TheI2CreadfunctionalityisdefinedbyadatastructureusedtoinitializeI2Creads.
Mode I2C
addr
Mem
addr
Mem
len
B0 – B26 Flag
byte byte byte byte bytes byte
TheModebytecontrolstheoverallfunctionalityofthechannel.
4.1.1 Modebyte
D7 D6 D5 D4 D3 D2 D1 D0
R/W - - - - - - -
TheR/WbitisusedtocontrolwhatkindofI2Ctransactiontoperform.IfR/Wbitisset,thetransaction
willberead.IfR/Wbitisclear,thetransactionwillbeawrite.
4.1.2 I2Caddr
TheI2CaddrbytecontainstheI2Chardwareaddressofthedeviceto
beaccessed.Thisaddressbyteis
transmittedasthefirstbyteofanI2Ctransaction.Thisbytemustbeaneven8bitaddress,ie;bit0=0.
Note:Somedocumentation referstoI2Caddressesasa7bitaddressandifsothisreferstotheupper7
bitsoftheaddressb1b7.TheCDItreatstheaddressasan8bitvalue andthefirmwarewill
automaticallyadjusttheaddresstobereadorwriteasneededbasedonthefunctionselected.
Addressesexpressedas7bitvaluesmustbeprovidedasan8bit
valueinthefo rmof7bitaddress+0in
theloworderbit
4.1.3 Memaddr
TheMemaddrbytedetermineswhatmemorymapaddressbyteistransmittedfollowingtheI2Caddr
byteduringanI2Ctransaction.
4.1.4 Memlen
TheMemlenbytedetermineshowmanybyteswillbe
transferredto/fromthedevicestartingfromthe
Memaddr.Thisvaluemustbebetween127.
4.1.5 B0B26
TheB0B26bytesarethebufferfromwhichdataistransmitted,orintowhich receiveddataisplaced.
4.1.6 Flagbyte
TheFlagbyteisusedto
activateanI2Ctransaction.TheFlagbytedefaultsto00Hindicatingthatthe
writechannelisidle.Afterthestructurehasbeenwritten,thefinalbytewillbetheFlagbytewhich
shouldbewrittentoFFH.TheFlagbytewillautoclearto00Hwhenthetransactionhascompleted.
The
flagbytecanbeconvenientlymonitoredbycheckingthecorrespondingBufferflagstatusbyte.