The only software examples I can find are for an Arduino.
Is there anything written for a PIC?
I have been looking at the Arduino code and find some discrepancies:
The MS5837-30BA data sheet shows a table on page 9 that appears to have the bit numbers swapped. They are numbered from 0 to 7 but I think should be from 7 to 0.
The data sheet also shows the address to be 0xEC but the MS5837.h shows 0x76. Are they using 7 bits and shifting to make 8 bit? I don’t think so because they use the address directly e.g. wire.begintransmission(MS5837_ADDR); Maybe wire.xxx uses 7 bits?
I assume that wire.h are the I2C functions that do the I2C write and reads. So wire.begintransmission would be like I2C_start(). Obviously serial.print sends to a display device.
I program in CCS C in MPLAB so this software looks strange to me.