Hello, here are a few things I need to know : 1. I want to use bits 3 and 4 of PORTC for SCL and SDA when working with the I2C bus. I'm single master of this bus. My question is how to initialise this I2C-bus ?? I wrote some code. Does this code make any sense and didn't I forget something ? The declaration of the variables looks like this : #DEFINE SCL PORTC,3 ;SCL PIN #DEFINE SDA PORTC,4 ;SDA PIN INIT_I2C BCF STATUS , RP0 CLRF PORTC BSF STATUS , RP0 MOVLW B'11100111' MOVWF TRISC RELEASEBUS ; Don't know what this is and what it does ? ; Think it's a macro. Think it makes SDA and ; SCL high. CLRF BUS_STATUS ; Signalisation FLAG !! RETURN Is it so that you have to make SDA and SCL high to release the bus ?? -------------------------------------- 2. The following code that I found is a delay for 4.7 us : Delay47uSec movlw ((_47uS_Delay-8)/3 + 1) DlyK movwf DelayCount decfsz DelayCount goto $-1 return How does it work ? What is _47uS_Delay ? It's probably defined somewhere else !! goto $-1 --> a loop ?? -------------------------------------- 3. Slaves are allowed : Clock stretching ?? But when you have fast slaves, you don't have to implement this in your software. How do I know I have to implement it or not ? The I2C bus I'm working with is one inside a SONY TV. They told me that the I2C it uses, is not the fast on (400k ??) --------------------------------------- 4. I have a program where each operand is preceded by an underscore _ Why's that ? So that will do it for now !! All comments or advice are very welcome !! Greetings, Glenn Goovaerts