2017-10-31 12:41 AM
This is fundamental question, but I am confusing...
Please tell me what I think is right or wrong:
To communicate with LSM330DLC on SPI mode, the number of wiring between host and LSM330DLC is 5.
1 CS_A
2 CS_G
3 SCL_A/G(SPC)
4 SDA_A/G(SDI)
5 SDO_A & SDO_G tied togher(SDO)
The point I am comfusing most is the 5th wiring above.
Or must I use 2 pairs of SPI interface to use both Acc and Gyro?
Solved! Go to Solution.
2017-10-31 06:05 AM
higuchi_hagemu
you can connect it as you described and use only one SPI interface on your microcontroller.You can connect it like this:
Sensor ... MCU
CS_A ... GPIO1 or CS1
CS_G ... GPIO2 or CS2
SCL_A/G ... SCK
SDA_A/G ... MOSI
SDO_A & SDO_G (tied together) ... MISO
2017-10-31 02:37 AM
If you were planning to use a single SPI, it means no need to read data of both sensors at the same time.
In this case, I would use the same SPI with different alternate functions GPIOs for the data line (the clock line can be the same). Recipe:
Find an SPI with 2 MISO pins and 2 MOSI pins, 1 SCK and 2 GPIO for each CS.
2017-10-31 06:05 AM
higuchi_hagemu
you can connect it as you described and use only one SPI interface on your microcontroller.You can connect it like this:
Sensor ... MCU
CS_A ... GPIO1 or CS1
CS_G ... GPIO2 or CS2
SCL_A/G ... SCK
SDA_A/G ... MOSI
SDO_A & SDO_G (tied together) ... MISO
2017-10-31 05:32 PM
Thank you.
My brain become completely clear.
I think that this sensor consists two separated SPI slave device into one package.
I used to use MPU6050(I2C) and this one consists pure one I2C device,
so I have confused.
Thanks.