Dear all,
I'm a beginner in I2C programming I want to connect AT89S52 with DS1624 using I2C protocol. I'm having trouble with the SCL and SDA clocking time. I've tried many ways and unable to make the square wave signal. It seems the trouble with the delay on my I2C programming. I wanna ask is there any calculation formula to find out the delay that I must use in my programming to make the signal is good. Thank you for u're help.
Thank for u're help budhy but I'm still confused caused in the code that u've hyperlink for me written:
BitDly: NOP
RET
that mean that only need small delay for I2C but for my case I have try many combination of delay code, and I've had use like that before but it didn't work and I've checked the I2C signal on the agilent the signal is quite bad. The signal form like a triangle waveform and have a signal phase delay on it.
I would ask how could I know that the code that I've made have right although the signal that I've found in the agilent is bad?
I've pull the SDA and SCL line but maybe the R that I've used is insuffiecient to pull the lines, cause recently I've only used 1K ohm. Now I will try to pull with a larger R for the SDA and SCL.