Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/30/04 13:59
Read: times


 
#82241 - a possible fix
Responding to: ???'s previous message
But say if we use soft routines for I2C handling with micro being master and some other device say a PCF8574 port expander being slave mode & say I am communicating on soft I2C at 50kHz and while data transfer was on there is an interrupt which lasts for some time say 6mS interrupting I2C data transfer. Upon return from interrupt the micro will again start executing the soft I2C data transfer. In such an event will there be any problem or not? Friends I have never come across any problem due to above stuff so far but was just wondering can such a thing ever lead to problem or I2C bus immune to such timing disturbances.

The IIC bus is theoritically timing insensitive. However, I doubt that IIC chips are tested at 500Hz (~6ms pulse). Somewhere in the old DNA computer there is something about an IIC chip (do not ask which, my memory is not THAT good) that times out to avoid latch-up.

I use the verbage "fix" not "solution" because the solution is to use a chip with hardware IIC such as the P89C66x or P89LPC93x.

1) make the soft IIC timer driven instead of waitloop.
2) make the IIC timer highest priority.

The fact that any IIC operation is (or - at least - should be) very short, the higher priority IIC timer int should not kill anything.

On another note: a 6ms ISR will give you heaps of trouble, not only with IIC.

Erik



List of 18 messages in thread
TopicAuthorDate
soft I2C and interrupts.            01/01/70 00:00      
   Interrupt Issue with I2C            01/01/70 00:00      
      Interrupts & I2C            01/01/70 00:00      
   I2C or SMBus            01/01/70 00:00      
      Not SMBus PHILIPS I2C            01/01/70 00:00      
   a possible fix            01/01/70 00:00      
      Generic answer that is not true            01/01/70 00:00      
      ok Michael            01/01/70 00:00      
         Easy as pie.            01/01/70 00:00      
            Polarised view            01/01/70 00:00      
               no, Donald            01/01/70 00:00      
                  "            01/01/70 00:00      
                     Burned Fingers            01/01/70 00:00      
                        Donald, Michael            01/01/70 00:00      
                           Erik            01/01/70 00:00      
                              100% Agree            01/01/70 00:00      
                                 Ok            01/01/70 00:00      
                        Lazy            01/01/70 00:00      

Back to Subject List