EmbDev.net

Forum: FPGA, VHDL & Verilog I2C ACK bit Verification on Spartan 3-E


Author: Spartan_Newbie (Guest)
Posted on:
Attached files:

Rate this post
0 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.

Author: Ahmed Abbasi (Company: None) (newbiespartan)
Posted on:
Attached files:

Rate this post
0 useful
not useful
EDIT : REUPLOADING 2 IMAGES (STARTING i2c and ENDING i2c).

Author: Ahmed Abbasi (Company: None) (newbiespartan)
Posted on:

Rate this post
0 useful
not useful
Guys?

Author: Tim (Guest)
Posted on:

Rate this post
0 useful
not useful
If you are master than a valid Acknowledge bit occurs if the slave drag 
it low. Otherwise it is high. So what is the problem exactly? You can 
simply read out the signal level at the correct time.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.