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







Parents
  • Thanks!
    However i am not familiar with the german language.
    Could you please help me by pinpointing the file where the interrupt is implemented and the part where I2C read from the Slave is?

    I am assuming that I2C reading is found in
    the file I2C_lib.c and as uc_ReadI2C.
    am i right?

    Thanks again
    it a wonderful piece of codes just that i am still figuring out the description of each functions.

Reply
  • Thanks!
    However i am not familiar with the german language.
    Could you please help me by pinpointing the file where the interrupt is implemented and the part where I2C read from the Slave is?

    I am assuming that I2C reading is found in
    the file I2C_lib.c and as uc_ReadI2C.
    am i right?

    Thanks again
    it a wonderful piece of codes just that i am still figuring out the description of each functions.

Children