FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5990 Discussions

i2c communication with itg-3200

Altera_Forum
Honored Contributor II
970 Views

Hello everybody, 

I want to connect a 3axis digital gyroscope ITG-3200 with cyclone FPGA kit(EP1C12Q240C8) of iisc Bangalore.II have hardware setup.My board does not contain nios ii processor or any I2C EEPROM.I have the following quarries: 

 

1.Whether i2c communication is possible in my kit or not?Which pins can be used for this connection? 

 

2.The i2c library of itg-3200 are written in c for aurdino driver.How to define this library for our kit. 

 

3.I am attaching my board details(BOOK II-CHAP 2),itg-3200 datasheet.If anyone know how to interface itg-3200 with this kit  

Please give me your valuable suggestion. 

 

Thank you
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
88 Views

You can use the digital I/O pins for the I2C bus. The SDA pin needs to be birectional so you will probably have to use a hole 8-bit group just for this signal. 

There are several ways to implement an I2C bus, with a hardware controller (there is one on Opencores) or by software using bit banging. Do you have a CPU in your project? What is it, if it isn't a NIOS?
Altera_Forum
Honored Contributor II
88 Views

I tell you my experience to communicate with a I2C memory. I used 2 pins of the FPGA to communicate with the chip. One output for clock, and other bidirectional ( inout std_logic ) for data. The pin has an external pull-up and behaves like an open-collector as I2C needs. 

 

First I wrote a component, based on a state machine, to send a byte to the memory. I used this component in other state machine to send some bytes, and make a complete trasaction of writing a byte in the memory. In a similar fashion a make a component to read a byte from the memory and used in the read operation. 

 

You need a lot of pacience and a digital oscilloscope to debug this.
Reply