I2C "SCL" line problem



Hi all,

I faced the following problem with my I2C slave code(VHDL).

I was incrementing a counter on the negative edge of SCL(this clock is
coming from the processor's I2C port , 100 KHz frequency).
But what i observed on the CRO was that my bit counter which was
running on the "negative edge" of SCL , was incrementing on "positive
edge" also and this was not happening always.

The solution to this problem was i inverted the incomimg clock "SCL"
and used the rising edge to increment my counter now it was fine.

Can any I2C experts clarify what is the problem with working on
"negative edge of "SCL" clock.


Regards,
Prav

.



Relevant Pages

  • Re: Low frequency clock generation - need help
    ... clocked by the negative edge of sys_clk to have the clock enable ... but it is also unneeded and not helpful to use the negative edge ... whatever additional clock enables you may need. ... wanted more before I had integrated all my SPI modules. ...
    (comp.arch.fpga)
  • Re: 74HCT4094
    ... >> one that changes on the positive edge of the clock, ... >> the output that changes on the negative edge. ... > of the output driving stage driving stage for the ...
    (sci.electronics.design)
  • I2C "SCL" line problem
    ... I was incrementing a counter on the negative edge of SCL(this clock is ... The solution to this problem was i inverted the incomimg clock "SCL" ...
    (comp.arch.fpga)
  • I2C "SCL" line problem
    ... I was incrementing a counter on the negative edge of SCL(this clock is ... The solution to this problem was i inverted the incomimg clock "SCL" ...
    (comp.lang.vhdl)
  • Re: rising edge of the clock and data
    ... If your output is both clock and data, consider inverting the clock output.. ... use a negative edge clocked FF at the output with a postive edge ...
    (comp.lang.vhdl)