FEZ Mini and NETMF Limitations

Hi Gus (and others)
I am starting to sketch up the requirements of my application and I have a couple of questions on the FEZ Mini.

  1. Is it possible to address 2 or more I2C Slave devices. If so how could one lock the bus so that only one routine has access to it at a time. Failing locking I could use a global flag and set/reset it each time I need to access the I2C.

  2. With the SD card capabilities - can I open up multiple files at one time - I would not be loading them into memory but using SEEK and READ to get a small block of bytes from a file.

Many thanks for any advice.
Dave

As far as multiple files, I can on my domino SD.

private static void OpenMultipleFiles()
{
    SDDrive drive = new SDDrive();
    drive.Mount();
    try
    {
        string[] files = drive.Files;
        using (var f1 = File.OpenRead(files[0]))
        using (var f2 = File.OpenRead(files[1]))
        {
            Debug.Print(f1.Name + " Size:" + f1.Length);
            Debug.Print(f2.Name + " Size:" + f2.Length);
        }
    }
    catch (Exception ex)
    {
        Debug.Print(ex.Message);
    }
    finally
    {
        Thread.Sleep(1000);
        drive.UnMount();
    }
}

As far as I2C goes…

There can be 127 addresses on a single bus…

Device dependant of course.

Cheers Ian

Many many thanks for the help William and IanR

Take care
Dave