eepty
Full Member level 2
The PIC18F45K22 datasheet said for I2C function, the SCL.TRIS and SDA.TRIS should be set to high, and the hardware will change the output of SDA and SCL automatically.
However, in many I2C example code, it seems that they always set SDA.TRIS to 1 for output high at SDA pin, and set SDA to 0 for a output low.
Is this correct? Can I just set SDA pin (or SCL pin) to 1 for a output high and SDA pin (or SCL pin) to 0 for a output low?
However, in many I2C example code, it seems that they always set SDA.TRIS to 1 for output high at SDA pin, and set SDA to 0 for a output low.
Is this correct? Can I just set SDA pin (or SCL pin) to 1 for a output high and SDA pin (or SCL pin) to 0 for a output low?