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

Interfacing 8051 UART to I2C slave

Does anyone have any ideas on interfacing the standard 8051 UART in mode 0 to interface to an I2C slave? I was thinking of writing the address of the slave, then shifting the acknowledge back in immediatley after. Any feedback would be appreciated.

Matt

Parents
  • The only way you can have I2c communication, is when you yourself are manipulating some pins of some port (eg. P1.6 and P1.7). I suggest not to use pins that have already a double functionality (like for instance P3.0 and P3.1, which can be used for UART communication too).
    Unless your device has a hardware I2c controller on board, you should write the I2c protocol yourself (which isn't that difficult).

Reply
  • The only way you can have I2c communication, is when you yourself are manipulating some pins of some port (eg. P1.6 and P1.7). I suggest not to use pins that have already a double functionality (like for instance P3.0 and P3.1, which can be used for UART communication too).
    Unless your device has a hardware I2c controller on board, you should write the I2c protocol yourself (which isn't that difficult).

Children