# What is slew rate for I2C?

I'm configuring I2C on a PIC18 using the built-in functions of the C18 compiler as described in section 2.4 of the documentation:

void OpenI2C2( unsigned char sync_mode,
unsigned char slew );


I'm not sure what I should do with slew. I can choose from two options, defined in i2c.h:

• SLEW_OFF: Slew rate disabled for 100 kHz mode
• SLEW_ON: Slew rate enabled for 400 kHz mode

In the datasheet in register 15-1, page 257, the two options are explained in a bit more detail:

• 1 = Slew rate control disabled for standard speed mode (100 kHz and 1 MHz)
• 0 = Slew rate control enabled for high speed mode (400 kHz)

I don't understand it though - I have a couple of questions:

1. What is slew rate?

2. For me, the two options don't make sense - what if I'd want to disable the slew rate for 400kHz and enable it for 100kHz? Why is this?

3. When should I choose SLEW_OFF and when SLEW_ON?