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.
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)
2021-06-04 04: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ò
2021-06-07 03: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.
2021-06-08 07: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ò
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,
2021-06-14 08: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
2021-06-15 04: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ò
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
2021-06-17 04: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.
2021-06-18 07: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ò