Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

I2C implementation in VHDL

AUden
Beginner
2,312 Views

Hey !

 

i am trying to implement i2c protocol using VHDL Language. In my Case Master is Arria V FPGA & Slave is ADV7182. 

 

The issue what i am getting is Acknowledgement. I am getting not Acknowledgement.

 

Please let me know what is my mistake in my VHDL code. i am getting struct now.

0 Kudos
4 Replies
Tricky
New Contributor II
1,210 Views

I suggest not using SCL_CLK as a clock. It is very slow compared to the FPGA clock and wont be a very good clock. Use the FPGA clock for everything and use the SCL_CLK you generate as a clock enable for the I2C registers.

0 Kudos
mfro
New Contributor I
1,210 Views

>> The issue what i am getting is Acknowledgement. I am getting not Acknowledgement.

 

How do you know that? Your code appears to be incomplete.

 

Check your state machine.

 

If you receive an acknowledge from the slave, it goes into state x"06" that takes you to the WHEN OTHERS case with your state machine getting stuck.

0 Kudos
AUden
Beginner
1,210 Views

I checked on CRO data what i am writing was correct but in acknowlegement clock cycle SDA was high

it should be low in acknowledgement clock cycle.

 

Well once it get the acknowledgement it should go to state 6 but it was going to ideal state i.e. state 0

So No acknowlegment.

0 Kudos
AUden
Beginner
1,210 Views

Tricky : well may be you are correct ,Actually i have one doubt whether implementation of SDA is correct or not

and how can we say SCL_CLK will be one of the issue. any suspect you have for this.

0 Kudos
Reply