i2c Bus

Discussion in 'VHDL' started by sofi, May 13, 2004.

  1. sofi

    sofi Guest

    hallo all ,
    i am a beginner in vhdl , i need help .
    i just want to ask with VHDL code wether the i2c Bus is free.
    bus is free when a stop condition is sent und known start condition is sent


    this is a start condition

    ______
    scl(1)
    __
    \__
    sda(1->0)

    this is a stop condition

    ______
    scl(1)
    __
    __/
    sda(0->1)



    please help me .
    thanks
     
    sofi, May 13, 2004
    #1
    1. Advertising

  2. I think what you are asking for is a falling edge detector and a rising
    edge detector.

    Very simple:
    SIGNAL sda1, sda2, falling_edge, rising_edge : std_logic;
    BEGIN

    proc1: PROCESS
    BEGIN
    WAIT until clk='1';
    sda1 <= sda;
    sda2 <= sda1;
    END PROCESS;

    falling_edge <= not sda1 and sda2;
    rising_edge <= sda1 and not sda2;



    "sofi" <> wrote in message
    news:...
    > hallo all ,
    > i am a beginner in vhdl , i need help .
    > i just want to ask with VHDL code wether the i2c Bus is free.
    > bus is free when a stop condition is sent und known start condition is

    sent
    >
    >
    > this is a start condition
    >
    > ______
    > scl(1)
    > __
    > \__
    > sda(1->0)
    >
    > this is a stop condition
    >
    > ______
    > scl(1)
    > __
    > __/
    > sda(0->1)
    >
    >
    >
    > please help me .
    > thanks
     
    Charles Bailey, May 13, 2004
    #2
    1. Advertising

  3. sofi

    sofi Guest

    thanks :)
     
    sofi, May 14, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carel harmsen

    Re: regarding I2C protocols

    carel harmsen, Jun 23, 2003, in forum: VHDL
    Replies:
    0
    Views:
    2,174
    carel harmsen
    Jun 23, 2003
  2. rickman

    Re: regarding I2C protocols

    rickman, Jun 23, 2003, in forum: VHDL
    Replies:
    5
    Views:
    2,732
    kryten_droid
    Jun 24, 2003
  3. Wolfgang Denk

    Re: Q: regarding I2C protocols

    Wolfgang Denk, Jun 23, 2003, in forum: VHDL
    Replies:
    0
    Views:
    2,398
    Wolfgang Denk
    Jun 23, 2003
  4. y_p_w

    Re: regarding I2C protocols

    y_p_w, Jun 24, 2003, in forum: VHDL
    Replies:
    1
    Views:
    3,167
    Gerard
    Jun 24, 2003
  5. Thomas
    Replies:
    10
    Views:
    3,908
    Nicolas Matringe
    May 7, 2008
Loading...

Share This Page