Interfacing in C with PMOD Gyro (I2C)

Discussion in 'Embedded Systems and Microcontrollers' started by tacker, Nov 27, 2013.

  1. tacker

    Thread Starter New Member

    Nov 27, 2013

    I am working on a project that uses the Xilinx Virtex 5 board. I have been researching everywhere on how to interface with the Digilent PMOD GYRO (L3G4200D) through I2C core. I have set up the I2C core in the Xilinx EDK and exported the design to SDK. Now I am stuck on what the basic function calls (in C) are to simply interface with the device and read the X,Y, and Z angular rates. I know the general that you must:


    send slave address + write
    ..receive acknowledge(?)
    send register address
    ..receive acknowledge(?)
    slave address + read

    I am just confused as to what function call each step utilizes (what function and where it comes from eg: XIic_MasterRecv from xiic.h)
    and what happens after we send slave address and attempt to receive a byte.

    Any help would be appreciated! Thank you.