CONFIG I2CDELAY

Top  Previous  Next

Action

Configures the delay for the I2C clock.

 

 

Syntax

CONFIG  I2CDELAY = value

 

 

Remarks

Value

A numeric constant.

1 will generate the default clock.

0 will generate a higher clock and >=2 will generate a lower clock frequency.

 

By default the following delay routine is called with an ACALL :

 

Delay5:

 Nop

Ret

 

For 12 MHz, there is a 1 MHz system clock. So not counting the other statement, the minimal delay is 4 * 2 = 8 cycles.

The I2Cdelay value will insert the number of specified NOP instructions.

By default the settings are right for all I2C devices and when working with a 12 MHz crystal.

 

See also

CONFIG SCL , CONFIG SDA

 

 

Example

CONFIG I2CDELAY = 0                'we need a higher clock