Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i2c master vhdl opencore project example

Status
Not open for further replies.

mr_j

Newbie level 4
Joined
Aug 27, 2007
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
i2c master vhdl

can someone help with with a hard-coded, non-microcontroller dependent i2c core? I basically want to be able to turn turn on my CPLD, and have it query a slave device, then light an LED based on the info it receives. The opencores i am finding are 1000 LOC and seem way to complex. I am looking for something basic with i_clk and SDA and SCL out...

Thank You.
 

Re: i2c master vhdl

just go through the following pdf this will definately help you.
 

i2c master vhdl

gck-
Thanks for the pdf. I have actually gone through the xapp333, as well as the vhdl code they provide with it. It still has a huge ucontroller interface. Their solution is 15 vhdl files and 1000's of LOC. It is very hard for me to make sense of it in order to strip off the ucontroller parts. Isn't there a much shorter (perhaps less than 300 LOC) solution out there for an interface without all the "extras"?
 

i2c master vhdl

I2C is a pretty simple protocol. If your I2C device and "query" procedure are simple too, then you could build a tiny sequencer (using a counter and some logic) that wiggles the I2C signals to access the device's data, and then stores the received data into a register to light the LED. Those are just guesses, because I don't know your hardware setup.
 

Re: i2c master vhdl

hi mr_j,
I agree that solution is big one but you can take the idea and make according to your need.

If you are targeting perticulat IC which has I2C interface then its very easy to modify the programms.
 

i2c master vhdl

Thanks for the advice, all. I agree that I2C seems simple. I just prefer to build off of something that I know works for debugging my design and for speed's sake. Right now I have decided to use the simple_i2c opencore, along with tst_ds1621. Hopefully this'll work. Thanks for your responses!
 

i2c master vhdl

I am having another problem - hopefully someone can help. I am feeding a 400kHz clock into my CPLD, which is running the simple_i2c + tst_ds1621 code from opencores. When I turn on the circuit, my scl line starts running, but only at about 4kHz. I know this is related to the CLK_CNT variable, but I don't understand how/what it is doing. I can post code if you need, but it seems like everyone has seen the opencores i2c.

Added after 15 minutes:

i think i found it....it looks like it is the prescale register, similar to the one in the master file
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top