First the obvious question...
If the Datasheet says that the EEPROM has a I2C clock frequency of 400 kHz
and the I2C compatible sensor has a I2C clock frequency of 1 MHz, is that
the data rate that I have to change on TwiMaster?
And if so, I have this sensor that has 2 different clock speeds, one for
EEPROM and one for the sensor data so I've tried to do this...
try{
Thread.sleep(5);
if (eepromFlag){
twiEeprom = ioio_.openTwiMaster(0, TwiMaster.Rate.RATE_400KHz, false);
if (ReadEeprom(0x50, twiEeprom)){
//write address number 247 (oscillator trimming value) into register 0x93
byte[] trimValueResult = new byte[0];
if(write_trimming_value(trimValueResult)){
Log.d(TAG, ":) Success writing trimming value");
eepromFlag = false;
}
}
twiEeprom.close();
}else if (readFlag){
Thread.sleep(200);
twiTemp = ioio_.openTwiMaster(0, TwiMaster.Rate.RATE_1MHz, false);
ReadSensor(0x60, twiTemp);
}
I figured that I could close the first "twiEeprom" and the open the
"twiTemp" on the same wires. This has not worked so I'm not sure what I'm
doing wrong.
PS. I tried to connect both twi0 and twi1 to the same SCL and SDA on the
sensor which very effectively killed my IOIO and my Sensor so it will take
me a bit to be able to test more code, but any clues will help
Thanks
--
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.