The problem is to making soft i2c in my renesas controller.

Thread Starter


Joined Aug 2, 2015
hello....i am trying to making soft i2c in my renesas controller....but im facing one problem.....first i m using start condition...and then i am writing 1 byte...and at the 9th clock pulse....when i make my port as a input pin...the SDA line that should be done LOW by is not what can i do for that?plz help


Joined Apr 24, 2011
I have a love/hate relationship with I2C. Love how easy it is electrically to set up and add new devices to an existing bus. Hate how complicated the transactions can be.

You are doing the right thing stopping when you don't get the ACK (acknowledge) signal back. That signal is created by one slave device when it sees it's address correctly on the bus.

Well, you have a bunch of things to do to get that to work. Don't forget there is also a timing issue here so never change both clock and data together.

The address gives me trouble too, as the address is technically a 7 bit number placed in the upper portion of an 8 bit byte. Some manufacturers spec the 7 bit number, some the shifted number in the 8 bit space. Check the data sheet.

Finally, the memory itself may support multiple addresses using extra pins. Check you have them correct too.

I2C may go as slow as you want, so you can check the bus even with a voltmeter by running it in steps literally bit by bit

If you have further questions could you please post your code and a sketch of the SDC and SCL waveforms? Also what device are you addressing?

And welcome to the forums!
Last edited:


Joined Apr 24, 2011
Sorry I have not had to bit-bang an I2C bus since I stopped working tieh Basic Stamps 15 years ago, and that code was in the Basic language