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 ON P89C51RD2(Philips micro controller)

sir,
i want to do project on i2c
P89C51RD2 (PHILIPS UC)which doen't contain
I2C controller.

how to implement i2c on that.
pls send codes for that

Parents

  • See Keil's app note 153 and supporting code.

    If you don't have an actual I2C controller on your device, then you'll have to emulate one by using software to toggle a couple of programmable I/O pins to produce the right output waveforms. In that case, you'll probably also want the Philips I2C bus spec.

Reply

  • See Keil's app note 153 and supporting code.

    If you don't have an actual I2C controller on your device, then you'll have to emulate one by using software to toggle a couple of programmable I/O pins to produce the right output waveforms. In that case, you'll probably also want the Philips I2C bus spec.

Children
  • 1. means we can implement CLK & DATA lines
    using port bits say in p89c51rd2 we can take port1(programmable).is it correct?

    2. u r mentioning that special PHILIPS BUS is needed.can't we take some low impedence wire?

  • we can implement CLK & DATA lines
    using port bits say in p89c51rd2 we can take port1(programmable).is it correct?
    In The P89C51RD2 port 1 bits 6 and 7 are open collector for precisely this purpose.


    u r
    no, the wire does not need to be microohms

    Erik


  • Yes, I meant that you could use PIO pins such as those on port 1 as the clock and data lines for the I2C interface. Software will have to toggle the two pins appropriately to make it look like an I2C transaction to the other device(s).

    I suggested that you might want the Philips I2C spec simply so that you'd be sure how to program your emulated I2C interface. I wasn't even thinking of the physical connection, but rather the logical waveforms that need to appear on those two pins.