Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 2006
Posted: 08:38am 07 May 2020
Copy link to clipboard
Print this post
In the latest Silicon Chip there is an article on an Altimeter using a 28 pin Micromite Backpack. The BMP-180 pressure sensor is connected to I2C pin 17 (clock) and pin 18 (data). Reading through the code there is
PIN(17) = 0 ' set pin 17 to low and SETPIN 17, DOUT ' declare it a digital output (SCL)
why would pin 17 have to be set as DOUT ? I have used these pressure sensors and have never done that. I looked all through the code and can see no other reference to pin 17."It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10574
Posted: 09:03am 07 May 2020
Copy link to clipboard
Print this post
Because they are i...ts
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 2006
Posted: 09:12am 07 May 2020
Copy link to clipboard
Print this post
@ Matherp, obviously I could not post the entire code which may make a difference. I just had a thought, part of the code gets the calibration values from the BMP-180 does it have something to do with that, Edited 2020-05-07 19:14 by palcal"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10574
Posted: 09:19am 07 May 2020
Copy link to clipboard
Print this post
No. All they are doing is effectively creating a duff clock pulse. The MM2 has a mechanism in the I2C OPEN that already ensures that the I2C bus isn't stalled which can happen if, for example, you reset the MM2 during an I2C transfer. There is no reason to do what they do and IMHO is is absolutely the wrong thing to do. Just comment out the lines.
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 2006
Posted: 08:43pm 07 May 2020
Copy link to clipboard
Print this post
Thanks for the explanation."It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"