cancel
Showing results for 
Search instead for 
Did you mean: 

uPSD I2C Driver Question???

Posted on March 18, 2005 at 22:51

uPSD I2C Driver Question???

2 REPLIES 2
Posted on May 17, 2011 at 12:06

I am using the sample uPSD I2C driver contained in one of the App. Notes. However, in order to make the I2C driver work with a certain device, I need to delay the sending of I2C data w.r.t.

the I2C clock, in the range of about .5 microsec - 1 microsec. I suspect there is a way of accomplishing this either by correctly setting up S1CON/S1SETUP. Or, by possibly changing the

order of some instructions in the code, so the I2C clock starts slightly earlier before the I2C data begins to get sent. Any ideas?? Thanks for your help.

asterna
Associate II
Posted on May 17, 2011 at 12:06

Hi,

I think that first you should consider the following questions:

- what max I2C speed is supported by your slave device (Standard, Fast or High),

- are the CR0, CR1, CR2 bits in S1CON set accordingly to your crystal frequency (you should not exceed max I2C speed),

- is the I2C START condition sample in S1SETUP set correcttly also here I2C speed is important).

I don't think that you cannot control data/clock sequence by changing some instruction order. The data/clock are generated internally by I2C engine in hardware.