SPI with LIS3DH Accelerometer is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-19 10:05 PM
I am using a PIC32MX250F128B . I am trying to communicate with LIS3DH through SPI connection. I have several other devices like ADC, DAC working with SPI protocol perfectly fine. However the Accelerometer does not.
With the scope my CS, Clock and SDA matches the diagram from datasheet (its sending the correct address of WHO_AM_I register ) but SDO output remains silent. Cant see anything coming out of accelerometer.
I am trying to get the who_am_i register value but the output i am getting is zero.
I have attached a scoped picture of my SPI. I have tried rest of the 3 mode other than the mode mentioned in the datasheet.
Any suggestions or solution from the community would be much appreciated. I have gone through several posts with the same problem but with no solution.
I hope I can get one.
N.B: All my connections are perfectly fine and other SPI connections are also working fine (ADC, DAC). I've also purchased several breakout boards (Adafruit, seedstudio) but that does not work either.
Here in this picture
yellow line : CLK
Pink waveform : SDO
Cyan waveform: SDA
CS is working fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-03 11:16 PM
Hi,
Yes, SDA and SCK goes over 2.64v, SPI configuration is as follow :
CLK polarity : High
CLK phase : 2 Edges
Prescaler 128 (937.5 Kbits/s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-04 4:07 AM
Hi @Community member​ ,
thank you for checking all info.
I'm starting to think this is a connection issue.
can you confirm that the sensor is well soldered and positioned?
did you follow the application hints of the datasheet regarding the schematic?
Niccolò
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-07 3:46 AM
Hi,
I used a HW-664 that contains a LIS3DH in SPI mode and i still have same results, now i am sure that the problem is software but i have no idea where it is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-08 7:18 AM
Hi @Community member​ ,
I'm sorry but how can you be sure that the problem is software if the software runs well on your other components?
Niccolò
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-08 11:05 PM
Hi,
The LIS3DH is the only slave on the SPI bus, I cannot be sure that SPI software can run it.
As for the CS line, I'm gonna add it in the next design because it's the only thing unsure in the hardware design.
Thanks a lot for your support,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-14 8:37 PM
I am posting as regards the main. I really don't understand wats wrong i have verified everything verifiable, the sensor still doesn't respond.
The hard ware connections are fine. please advise what to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 4:23 AM
Hi @CDuru.1​ ,
the communication seems fine, In my opionion it shoul be something regarding connections.
can you check that every pin is connected in the right way?
Niccolò
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-16 12:20 PM
I have double and also swapped in all possible permutations. just to give a brief overview I am now using the seed studio breakout board found in the link attached. connection's stated below. its the second breakout i have opted to use and same response all I get is 0xFF.
Please advise thanks.
LISbrkout pic32
CS -> CS
SCK -> SCK
SDO -> SDI
SDI -> SDO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-17 4:23 AM
I additionally have this hassle with my LIS3DH. CS is constantly pushed low, MISO is pulled up and I obtain 0xFF when I attempt to study page WHO_AM_I register, been caught on this malicious program for days now and I want your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-18 7:51 AM
Hi @CDuru.1​
I'm sorry, but is your problem the same as @Community member​ 's?
his response was 0x00.
if your response is 0xFF, can I see a picture from the oscilloscope?
Niccolò
