You have two choices:

   1. Connect each of the I2C devices to a separate I2C bus, and operate
   each bus at the maximum speed allowed by the device.
   2. Connect both to the same bus and use the minimum speed of the two
   (i.e. 400KHz).

Your open/close strategy is not a good idea, since you're exposed the slow
device to a fast bus activity, which may cause it to go crazy.

I don't understand exactly what you did in order to fry the board. If what
you did is to try to connect two of the IOIO I2C ports in parallel, it
should not do any damage (but also, it is completely pointless I believe).


On Fri, Apr 4, 2014 at 10:15 AM, Santiago Alfaro <[email protected]>wrote:

> 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.
>

-- 
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.

Reply via email to