I2C ACK bit Verification on Spartan 3-E

Guest #4839789
Rate this post
• ▲ useful
▼ not useful
I have written code for I2C communication between Spartan 3-E and the 
ADV7171 encoder.The code simulation results attached here show the I2C 
start, stop conditions and one random byte transfer between two 
ACKS.From what I've read the slave device should send an ACK bit (pull 
SDA low) on the 9th clock cycle.I am using a tristate buffer to control 
the inout SDA pin and was wondering if there's any way to know whether 
or not a successful ACK bit has been sent.

NOTE : The FPGA is only expected to operate in the master mode.

My approach :assign ACK = IO? (STARTCLK? SDA? 0 : 1 : 0) : 0;

The idea is to check  if (IO==1(Buffer output = z) and SDA == 0).This 
doesn't work.

I  have also attached the entire I2C code and would be extremely 
grateful if someone could have a look.
Attached files:

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.