I’m currently working on interfacing the BAR30 module with a PIC MCU for a personal ROV project of mine and have run into some questions regarding the MS5837 data sheet and was wondering if anyone had any info that might help. I am currently getting somewhat “reasonable” temperature results but not terribly accurate as they vary ± 5 deg F from what the temp should display. I’m going through my code looking for errors but I am unsure if I am implementing the reading of the PROM coefficients correctly (C1-C6). On page 9 of the data sheet the chart lists the PROM read command as being a hex value from 0xA0-0xAE. Since bit #7 has to be a zero, this numerical range of values leaves 8 possible memory addresses.
On page 6 they mention that the coefficient W0 is used for factory calibration and I assume that W0 lives at the starting address of the block set aside for all of the PROM coefficients. Am I wrong in this assumption? This still leaves 7 addresses left over for the remaining 6 coefficients (C1-C6) but I can’t find anywhere in the data sheet exactly what address is assigned to C1. I’ve tried using both 0xA0 and 0xA2 as the value held for C1 but didn’t notice any changes to my final temp results. Any thoughts.
Secondly, the data sheet leads me to believe that these coefficients are hard-coded at the factory and don’t change due to any pressure or atmospheric conditions. As such, I also assume that they only need to be read once upon device startup and not re-read prior to every temp/pressure conversion. Does this sound correct, or is there a more elaborate calibration procedure that needs to take place prior to achieving an accurate temperature conversion? I should also mention that currently I have only been performing a 1st order temp conversion and not yet implemented a 2nd order conversion as shown in the flow chart on page 8 of the data sheet.
Lastly, I am unfamiliar with the CRC scheme they mention. Is this something that needs to always be done or only in certain circumstances.
Sorry for the long-winded post. This is my first time interfacing a device like this and I want to be sure I understand the data sheet correctly.