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
  • It is all too easy to get confused with this discussion. The initial thrust of this discussion was coonecting the serial port to the I2C device - and for the abovementioned reasons it will not work. Now, if you want to received commands and data via the serial port (uart) then send them to an I2C device, that is possible and fairly easy. There is plenty of code around detailing how to ise the uart and implementing an I2C master, all you need to do is come up with a method of connecting the two via software. Obviously this can depend of what sort of I2C devices you wish to talk to. If it is a I2C real time clock chip, you would want to read and write the time, if it is a eeprom, then you want to read and write bytes. What do you want to do?

Reply
  • It is all too easy to get confused with this discussion. The initial thrust of this discussion was coonecting the serial port to the I2C device - and for the abovementioned reasons it will not work. Now, if you want to received commands and data via the serial port (uart) then send them to an I2C device, that is possible and fairly easy. There is plenty of code around detailing how to ise the uart and implementing an I2C master, all you need to do is come up with a method of connecting the two via software. Obviously this can depend of what sort of I2C devices you wish to talk to. If it is a I2C real time clock chip, you would want to read and write the time, if it is a eeprom, then you want to read and write bytes. What do you want to do?

Children