We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Newbie dale77
Registered: ‎06-03-2019

Implementation of i2c master and slave on a fpga board

Right now, I have a master sending data to a slave that then displays them onto LED lights so I can check that the bits are the same. My problem is I can only read or write. I can't leave the option open to do both because I get an error saying so and so cannot be assigned SDA because SDA is getting driven in multiple spots, which makes sense because SDA is an inout for both entities, but I made sure to leave them 'z' when not in use. So I am guessing when I make it wr only, the multiple drivers error go away. So my question is, can you implement both a master and slave that you make? or can I only create a master and use slaves that came with the board already? My main goal was to just to write data to the slave, then read the data back and THEN output it to the LED lights.

0 Kudos
1 Reply
Scholar u4223374
Registered: ‎04-26-2015

Re: Implementation of i2c master and slave on a fpga board

So you want to do this entirely inside the FPGA?


The FPGA doesn't have any internal tri-state buffers; those are only available on the I/O ports. You can achieve something very similar by ANDing all the outputs together - then the result will be 1 if all of the outputs are 1, and 0 if any of them are 0 (same as what I2C's open-drain system produces).


0 Kudos