This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C Slave implementation with interrupt in C

Hi there,
I am using a Philips C51 family microP for a project.
I am trying to access implement this:


(Slave)                 (Master) 
[MicroP]===I2C Port0====[Controller Chip]
   ||                           |
   ||                           |
 I2C Port1                  interrupt
   ||                           |
   |========[IO Expander]--------
              Port6 


Slave address is at 0x66
IO Expander address is at 0x74

The MicroP is to be init as Slave
while the Controller Chip as Master


When the Slave wants to send data to Master
it will send an interrupt via the IO Expander to the controller Chip.

The controller chip will then read from the microP.

Does anyone ever implemented this before?
I had tried to search http://www.keil.com
under "Technologies" but i have not come across anything similar to my implementating yet.

just some reference code in C for the Slave and interrupt portion will be very useful for me

many thanks
Ben