FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2003, 01:12 AM
y_p_w
Guest
 
Posts: n/a
Default Re: regarding I2C protocols

"Tauno Voipio" <[email protected]_REMOVE.invalid> wrote in message news:<[email protected]>...
> "rickman" <[email protected]> wrote in message
> news:[email protected]
> > Tauno Voipio wrote:
> > >
> > > "y_p_w" <[email protected]> wrote in message
> > > news:[email protected] 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
  #2 (permalink)  
Old 06-24-2003, 12:49 PM
Gerard
Guest
 
Posts: n/a
Default Re: regarding I2C protocols

>
> 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

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Q: regarding I2C protocols Wolfgang Denk Verilog 0 06-23-2003 10:40 PM


All times are GMT +1. The time now is 08:20 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved