1. have a look at your Xilinx\"version"\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\iic_"version"\examples
2. i think the relevant example for you is : xiic_repeated_start_example.c
3. if you are stuck you can implement the i2c hw yourself and use gpio to control it.
Thank you very much for your quick and helpful reply.
I think I have that down, so if I'm correct it looks like I:
set the address of the slave
start
perform a master_send with the register address that I want to eventually read from and the 'read' bit at the end.
set repeated start option
then master_rec to grab the value off the bus
and again to get next value
stop.
And just to make sure I added the I2C core properly in EDK, maybe you could help me through those steps? So I had a previous hardware setup with a plb bus containing low speed peripherals (Push buttons, LEDs, etc):
I then added an IIC device and connected it to this existing bus.
Then I went to ports and set the scl and sda to external
I also set up the interupt
In the ucf I connected the external scl and sda pin to connect to the appropriate
pin on the JA pmod.
A few questions:
1) Is it ok that I added the device to an existing bus with different peripherals?
Or should I need to create a new bus?
2) Either way, does the bus clk need to be the clk speed that the Pmod gyro requires? ie 100Khz or 400Khz. Right now it is set up as 125Mhz I believe.
Thank you again.