Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > i2c Bus

Reply
Thread Tools

i2c Bus

 
 
sofi
Guest
Posts: n/a
 
      05-13-2004
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
 
Reply With Quote
 
 
 
 
Charles Bailey
Guest
Posts: n/a
 
      05-13-2004
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: m...
> 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



 
Reply With Quote
 
 
 
 
sofi
Guest
Posts: n/a
 
      05-14-2004
thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I2C bus multiplexing inside CPLD Thomas VHDL 10 05-07-2008 07:21 PM
Address Bus and External Data Bus Confusion LoXodonte A+ Certification 1 04-18-2006 09:09 PM
Re: regarding I2C protocols rickman VHDL 5 06-24-2003 10:09 PM
Re: regarding I2C protocols carel harmsen VHDL 0 06-23-2003 09:43 PM
Re: Q: regarding I2C protocols Wolfgang Denk VHDL 0 06-23-2003 08:40 PM



Advertisments