Chip is 18F45K80. I changed pull-up values to 5.1K, not much difference in shape of signals, but at least now it works.
So in case of I2CWRITE, pins should be configured as input?
In your "working" example 2 you're actively driving the pins high and low.
I2C is an open-drain/collector bus where the high level speed is determined in part by the pullup values.
Season greetings
I wish to all Merry Xmas!
Ioannis Yesterday, 21:16Wish you a very happy Xmas with your family and have a great time together.
Ioannis