Microcontrollers and I2C device

Thread Starter

@vajra

Joined May 2, 2018
154
Hello

I have p89v51d2 microcontroller and ds1307 and it support i2c protocol . I have seen specification from the datasheet http://www.keil.com/dd/docs/datashts/philips/p89v51rd2.pdf and if I am not p89v51rd2 doesn't have inbuilt I2C module

I have found that If I do not have hardware i2c but I can still send and receive data using software "bit banging program.

What type of hardware I have to use for the communication between two devices if I don't use bit banging program
 

jpanhalt

Joined Jan 18, 2008
11,087
Assuming you want to stay with a Philips MCU, one option is the P87LPC769HD (https://www.futurlec.com/Philips/P87LPC769HD.shtml ). I am sure it has others that support I2C.

Another option is to switch to an MCU brand that offers more options for peripherals, e.g., Microchip.

Finally, the DS3234 allows SPI interface which your MCU supports. There are probably other RTC's that also use SPI. You didn't mention whether your RTC was a bare chip or one of the modules. That would be important to know.
 

atferrari

Joined Jan 6, 2004
5,011
Hello

I have p89v51d2 microcontroller and ds1307 and it support i2c protocol . I have seen specification from the datasheet http://www.keil.com/dd/docs/datashts/philips/p89v51rd2.pdf and if I am not p89v51rd2 doesn't have inbuilt I2C module

I have found that If I do not have hardware i2c but I can still send and receive data using software "bit banging program.

What type of hardware I have to use for the communication between two devices if I don't use bit banging program
By 2001, I did I2C by bit banging using the well known 16F84a (Microchip) following the outline given here

Leave to you to delve in the details but it was really simple. Worked well with a Master and two slaves.

If you look in the list of application notes (Micropchip), I am almost sure there was one explaining bit bagning I2C. Not recent, of course.

/EDIT
You asked, if not using bit banging! Sorry.

I would do what John suggested above.
EDIT/
 
Top