Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Newbie
prihabreco
Posts: 1
Registered: ‎01-16-2012
0

I2C for Spartan 3E

[ Edited ]

I'm working on a project involving I2C(using Spartan 3E FPGA) to communicate with EEPROM. I'm quite confused on how to start. Can someone suggesta vhdl code for an I2C Master mode?

 

I really appreciate the help. Thanks

Expert Contributor
eteam00
Posts: 8,196
Registered: ‎07-21-2009
0

Re: I2C for Spartan 3E

[ Edited ]

I'm working on a project involving I2C(using Spartan 3E FPGA) to communicate with EEPROM. I'm quite confused on how to start. Can someone suggest a vhdl code for an I2C Master mode?

 

Search the web for "I2C core".  If you are not yet familiar with I2C protocol, then learning about I2C should be your first effort.  The Wikipedia article on I2C is a good start, with links to the I2C specification and related docs.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Expert Contributor
gszakacs
Posts: 6,824
Registered: ‎08-14-2007
0

Re: I2C for Spartan 3E

The I2C cores I've seen have all been way more complex than you need for something like

talking to a single EEPROM.  Most support multiple masters, clock stretching, 10 bit addressing,

and usually have a slave as well as a master in the same core.

 

You can find out enough to roll your own I2C master from the EEPROM data sheet if all

you have on that I2C bus is the FPGA and the EEPROM.  I've done this both with HDL (Verilog)

and using PicoBlaze (bit-banging in assembly language).

 

If you intend to have an embedded processor using EDK (MicroBlaze), there is an I2C

IP core that comes with the EDK.

 

It's also worth searching these forums for "I2C Master VHDL" because I believe there

are quite a few threads on this subject.

 

-- Gabor

-- Gabor