Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Feb 2012 06:02 PM by  jsarao
I2C bus communication
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
thuynh2010
New Member
New Member
Posts:


--
30 Jun 2010 02:44 PM
    I'm trying to get the OMAP35x Zoom Development kit to communicate over I2C using Win CE 6.0.

    The goal is to communicate with an I2C device connected to I2C2 bus. Our device is at address 0x39.

    I used three API functions CreateFile, DeviceIoControl, WriteFile, and ReadFile to open I2C2 port, set slave address, and transmitted data in and out.

    Here is portion of my code.

    hPort = CreateFile(TEXT("I2C2:"),GENERIC_READ | GENERIC_WRITE,0,0,OPEN_EXISTING,0,NULL);
    result = DeviceIoControl(hPort, IOCTL_I2C_SET_SLAVE_ADDRESS, &dwSlaveAddr, sizeof(dwSlaveAddr), NULL, 0, NULL, NULL);

    SetFilePointer(hPort, 0, NULL, FILE_BEGIN);
    result = WriteFile(hPort, outdata, 2, &len, 0);

    I never get to talk to the device.

    Has anyone else seen this issue or do you have any ideas what may be wrong?
    thuynh2010
    New Member
    New Member
    Posts:


    --
    13 Jul 2010 08:50 AM
    Just want to let you know that I already got I2C working.
    jsarao
    New Member
    New Member
    Posts:29


    --
    28 Feb 2012 06:02 PM
    Posted By thuynh2010 on 13 Jul 2010 8:50 AM
    Just want to let you know that I already got I2C working.




    [old thread]

    did you have to do anything to get it to work?
    You are not authorized to post a reply.