M
Mike
Guest
Hi,
I'm having trouble understanding how to use the clock edges and I'm hoping
someone can help me. To explain my problem a little better, take for
example the i2c protocol. The i2c protocol uses a clock (SCL) and data
(SDA) line. SDA is valid and must remain stable while SCL is high. SDA can
only change while SCL is low.
I understand that in my VHDL design I simply read SDA on the rising edge of
SCL, but when do I write (output) data to SDA? If I use the rising edge of
SCL to write to SDA, then won't other devices on the bus miss my data? I'm
thinking this because I assume other devices are also reading on the rising
edge of SCL. So how can I be sure that I can write the data before they
read it (if we both use the same clock edge)?
Using the falling edge as well as the rising edge seems an uncommon
practice. So I was wandering how else I can go about it. I'm not using
i2c, but it explains my problem quite well.
Thanks for any help with this,
I'm having trouble understanding how to use the clock edges and I'm hoping
someone can help me. To explain my problem a little better, take for
example the i2c protocol. The i2c protocol uses a clock (SCL) and data
(SDA) line. SDA is valid and must remain stable while SCL is high. SDA can
only change while SCL is low.
I understand that in my VHDL design I simply read SDA on the rising edge of
SCL, but when do I write (output) data to SDA? If I use the rising edge of
SCL to write to SDA, then won't other devices on the bus miss my data? I'm
thinking this because I assume other devices are also reading on the rising
edge of SCL. So how can I be sure that I can write the data before they
read it (if we both use the same clock edge)?
Using the falling edge as well as the rising edge seems an uncommon
practice. So I was wandering how else I can go about it. I'm not using
i2c, but it explains my problem quite well.
Thanks for any help with this,