Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
connected but output is unclear.
Dear Kevin,
This is Gandhi again. Here I uploaded my output screen shot. Some unclear data with power of 3's. The waveforms and voltages are fine. My sensor MS5805 doesn't have CSB and PS pins. It has only four pins: VDD,SCL,SDA and GND. Is this could be a problem?? Also i got two warnings: Variable "ret" was set but never used in "ms5611.cpp", Line: 186, Col: 18.
Question relating to:
1 Answer
9 years, 7 months ago.
What code are you using? If it's the example code in ms5611.h did you check that your terminal program is set to the correct baud rate. The sample code is setting it to 921600, most PC applications only allow you to go up to 115200. Everything needs to be set to the same rate or you'll gibberish.
The MS5611 has two possible I2C addresses: 0xEC and 0xEE. The polarity of the CS pin determines which address to use. If CS is low, the address 0xEE is used. If CS is high, then 0xEC is used.
In the case of the MS5805, yes, there is no CS pin. The I2C address is always 0xEC. So, to guarantee that the ms5611 driver sees your device, you must use the "ms5611 ms(xxx, xxx, ms5611::CSBpin_1);" constructor. This forces the driver to use I2C address 0xEC.
In looking at the MS5805 data sheet, there are some minor differences compared to the MS5611. It is possible, you may get some unexpected reading inconsistencies. If so, you will have to make some minor changes to the ms5611 driver.
As for your "3" screen, I agree with Andy. There is something wrong with your ASCII terminal settings. Double check your baud rate, parity and stop bits. Also, some mbed products do not work at 921600 baud. Lower the baud rate to 115200 in the code and on your terminal.
Finally, don't worry about the compiler "ret" warnings. They were once used for the now commented out print statements for debugging back in the day.
posted by Kevin Braun 28 May 2015