Hi,
This is another tank-related post.
I recently got that accelerometer to work with a lot of help from this forum. It uses i2c and so uses pins 11 & 13 on a 20X2. I also want to interface this compass module with the same 20X2. It is designed for "basic stamps" and specifically the "shifit/out" command. I've check a few posts on this module and found that this command seems to be almost identical to our "shifin/out".
However, as the manual states, because I'm using a 20X2 I should go for "hspiin/out".
The problem then, is that the spi and i2c pins are the same. Can I wire up both modules on the same pins? I should be able to just turn off the compass module with its enable pin, and ditto with the accel, but this just requires a further bit of wiring, and crucially, slower code.
A simple high/low command doesn't take long, but I'm planning on this one chip doing A LOT of things at once, so if I could just issue the i2c and spi commands without enabling and disabling the chips, it would help to make the code as streamlined as possible.
Thanks in advance as usual,
David.
This is another tank-related post.
I recently got that accelerometer to work with a lot of help from this forum. It uses i2c and so uses pins 11 & 13 on a 20X2. I also want to interface this compass module with the same 20X2. It is designed for "basic stamps" and specifically the "shifit/out" command. I've check a few posts on this module and found that this command seems to be almost identical to our "shifin/out".
However, as the manual states, because I'm using a 20X2 I should go for "hspiin/out".
The problem then, is that the spi and i2c pins are the same. Can I wire up both modules on the same pins? I should be able to just turn off the compass module with its enable pin, and ditto with the accel, but this just requires a further bit of wiring, and crucially, slower code.
A simple high/low command doesn't take long, but I'm planning on this one chip doing A LOT of things at once, so if I could just issue the i2c and spi commands without enabling and disabling the chips, it would help to make the code as streamlined as possible.
Thanks in advance as usual,
David.