Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Re: regarding I2C protocols

Reply
Thread Tools

Re: regarding I2C protocols

 
 
y_p_w
Guest
Posts: n/a
 
      06-23-2003
"Tauno Voipio" <(E-Mail Removed)_REMOVE.invalid> wrote in message news:<5LHJa.361$(E-Mail Removed)>...
> "rickman" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Tauno Voipio wrote:
> > >
> > > "y_p_w" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed) om...
> > > > Hi-
> > > >
> > > > I'm currently in the process of creating a synthesizable Verilog
> > > > F/S I2C slave, but have little experience with I2C in the real
> > > > world.
> > > >
> > > > I'm reading the specs, and I feel I'm getting a pretty good
> > > > understanding. If I'm getting this right, the SDA line will only
> > > > change when the SCL line is low - except when the master is
> > > > indicating a START or STOP command.
> > > >
> > > > So the question I have for those who have really done this is -
> > > > in the real world, could a master (or series of masters) issue
> > > > a STOP command followed by a START command - all on the same
> > > > SCL high period. The latest I2C spec doesn't explain whether
> > > > or not this could happen.
> > > >
> > > > This is key to me, since I'm trying to create an I2C slave that
> > > > runs solely off the SDA and SCL signals. Whether or not I have
> > > > to deal with START and STOP on the same SCL high period will
> > > > impact the design choice I make.
> > > >
> > >
> > > AFAIK, that's normal when the bus is idle in the meantime.
> > >
> > > The idle bus has all drivers loose and both lines up. When the master

> ends a
> > > transmission, the last thing is the STOP condition: SCL up, then SDA up.
> > > When the next transmission starts, the first thing is the START

> condition:
> > > SCL still up, SDA down.

> >
> > I think he means the other way around, a START followed by a STOP with
> > no clock transitions inbetween. In essence, this would be an "empty"
> > frame.
> >
> > I have not worked with I2C before, so I don't know the answer. But I am
> > interested since I will be making one as well.
> >
> > I have not checked opencores.org, but it seems likely that they would
> > have a core for this. It might be a bit larger than you would want to
> > use however.
> >

>
> An empty frame is expressely forbidden in the specs. However, the logic must
> still not hang up if such a condition should happen.
>
> Tauno Voipio
> tauno voipio @ iki fi



Thanks for the answer. I actually re-read the spec, and noticed
that a STOP following a START in the same SCL high period is illegal.
I'm going to ignore an illegally applied STOP (i.e. illegal STOP
ignored). I was also worried about the possibility of repeated STOP/
START/STOP/START sequences.

However - as a follow-up question, would it be possible to see SCL
toggle after a STOP before the next START command "in the real world"?
None of the timing diagrams in the spec seem to address this
possibility; all diagrams show SDA and SCL staying high for the
foreseeable future. I'd guess that the thing to do is simply put
put the I2C slave in a wait state until a START condition is seen. I
wouldn't see any reason to toggle SCL between a STOP and the next
START, but I haven't seen any real-world designs.

Again - many thanks for the replies.
 
Reply With Quote
 
 
 
 
Gerard
Guest
Posts: n/a
 
      06-24-2003
>
> Thanks for the answer. I actually re-read the spec, and noticed
> that a STOP following a START in the same SCL high period is illegal.
> I'm going to ignore an illegally applied STOP (i.e. illegal STOP
> ignored). I was also worried about the possibility of repeated STOP/
> START/STOP/START sequences.
>
> However - as a follow-up question, would it be possible to see SCL
> toggle after a STOP before the next START command "in the real world"?
> None of the timing diagrams in the spec seem to address this
> possibility; all diagrams show SDA and SCL staying high for the
> foreseeable future. I'd guess that the thing to do is simply put
> put the I2C slave in a wait state until a START condition is seen. I
> wouldn't see any reason to toggle SCL between a STOP and the next
> START, but I haven't seen any real-world designs.
>
> Again - many thanks for the replies.


Hi



Well that's what really matters (IHO), "the real world". And in the real
world everything is possible. You can have a lousy implemented
micro-controller software I2C or even if you are debugging the hardware you
can accidentally toggle a line. I know applications where they misuse the
spec and by driving the SCL low between STOP and START for a certain time,
they signal other devices for example busmaster takeover. Everything is
possible.



If you are designing this for a real application you have to deal with the
real world and you must handle all the situations you can think off. It's
very clumsy if your hardware is 'hanging'. Master controllers are build
by spec's and slaves by sense.



Gerard



www.stacktools.com


 
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
How to use protocols.msn.FileSend and protocols.msnFileReceive yamadora1999 Python 2 05-25-2005 12:56 AM
Re: regarding I2C protocols rickman VHDL 5 06-24-2003 10:09 PM
Re: regarding I2C protocols kryten_droid VHDL 0 06-23-2003 11:48 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