Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can I get away with this in I2C?

Status
Not open for further replies.

kcmurphy88

Newbie level 6
Newbie level 6
Joined
Dec 6, 2007
Messages
12
Helped
0
Reputation
0
Reaction score
2
Trophy points
1,283
Location
Albuquerque
Visit site
Activity points
1,369
I have a application where I have to talk to an I2C device at the end of a cable AND also toggle a switch. It seems difficult, physically, to get the desired third control wire into the cable. I have SCL, SDA, power and ground.

1) I deal with the switch only at times the I2C is inactive.
2) There is only one slave device.
3) I do not care about the state of the switch while I2C is active, although I'd prefer it didn't float or rattle.

So, I thought that I would use very long START and STOP signals to control the switch, with some simple logic part to prevent rattling. What do long (~10mS) START or STOP signals do the an inactive I2C slave?
 

What do long (~10mS) START or STOP signals do the an inactive I2C slave?
What do you mean by "inactive" slave?
How does the slave "know" that it's inactive?
 

What do you mean by "inactive" slave?
How does the slave "know" that it's inactive?

According to the spec, if both clock and data are high, I2C is idle. Data going low while clock remain high is START. data going high while clock is high is STOP. Otherwise all data transitions are while clock is low (and read on posedge clock).

I want to cheat and use false start and stop signals with no intervening data as an out-of-band signal to, say, a d-flop.
 

The important point is not to bring the I2C slave into an illegal state. I'm under the impression that you have read the I2C specification well and should be able to answer the question yourself. I2C protocol is fully static with minimal frequency specification of 0. Yes you can perfom slow actions, but they must be legal I2C transactions, e.g. a start must be followed by stop condition.

I wonder if it won't be easier to use an I2C parallel expander like PCF8574 to control the switch.
 

Another option is to do the toggling with the clock pin instead of the data pin. This won't be considered as a stop or start condition.
 

The important point is not to bring the I2C slave into an illegal state. I'm under the impression that you have read the I2C specification well and should be able to answer the question yourself. I2C protocol is fully static with minimal frequency specification of 0. Yes you can perfom slow actions, but they must be legal I2C transactions, e.g. a start must be followed by stop condition.

I wonder if it won't be easier to use an I2C parallel expander like PCF8574 to control the switch.

I'd considered that, but the required switch response time is on the order of a microsecond, and 400KHz serial commands are too slow. My qualms with this is that I have no real experience with I2C and don't have a good feel for how actual parts behave. But thanks for your response.
 

Can't you just put in a small PLD/CPLD and decode the 7-bit address and R/W bit to control the switch. Say a write to the 0x1f address enables the switch, and a read from 0x1f disables the switch? I'm assuming that your I2C device doesn't use all the I2C address space. That way the transfer is a normal I2C address with no data and your I2C device will ignore the transfers as it's not within it's address space.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top