Using the HMC5883L compass.
DONNO
Posts: 2
I would like to know if this will work using the BS2SX stamp, or only the Propeller stamp.
Comments
Welcome to the Parallax forum! Please feel free to ask any questions here. There are many people in this forum that are more than willing to help.
The current code example on our product page is designed to work with the BS2p/pe/px. Below I have modified it so that it will work with the BS2/e/sx
Thanks..
Are you sure?
I don't use Stamps much but I think "Clock_Hold" is part of the start subroutine.
BTW, The Propeller is not a Stamp.
Works, but "I2C_Start:" is missing "RETURN".
This is correct, the START sequence sets the SDA and SCL to inputs. SDA is made LOW to initiate a START(transition from HIGH to LOW). The pullup resistors on the I2C line would normally make both the SDA and SCL HIGH, but if another device on the line is still talking the SCL will remain LOW. The START sequence falls through to "Clock Hold" where it remains until the SCL line goes HIGH.
banjo:
"Would the same code work with good ol' BS2?"
Yes, this is what I tested the code it with.