Quote Originally Posted by Lazuli View Post
...
I am struggling with I2C to communicate between PIC16F877A and a PIC16F87.
...

Olivier,

Do you HAVE to use I2C?

Is there any reason why you couldn't use USART to communicate between the 16F877A and 16F87?

16F87 p.99 section 11 AUSART

The AUSART can be configured in the following
modes:
• Asynchronous (full-duplex)
• Synchronous – Master (half-duplex)
• Synchronous – Slave (half-duplex)
16F877A p.113 section 10 USART

The USART can be configured in the following modes:
• Asynchronous (full-duplex)
• Synchronous – Master (half-duplex)
• Synchronous – Slave (half-duplex)
The acronym is slightly different, but when you read the descriptions, they are the identical.