Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 19:08 28 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM2: Problems with MPRLS0015PA0000SA SPI pressure sensor

     Page 2 of 2    
Author Message
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 01:47pm 13 Jan 2021
Copy link to clipboard 
Print this post

Hi,
I finally found some time to take care of my sensor problem.

I have now connected my logicanalyzer and can now see what I am really sending and how my sensor is reacting.

Mode 0 is the correct mode - only here I get a pulse on the EOC line (end-of-conversion indicator) when I send the correct start sequence!

Unfortunately, I still get "house numbers" as a response from the sensor!  

But I have found that sending ONLY works with "SPI write"!?  

With this code
 SPI write 1, &HAA
 SPI write 1, 0
 SPI write 1, 0
I can see this response on my analyzer:
MOSI: 0xAA  MISO: 0x40
MOSI: 0x00  MISO: 0xD9
MOSI: 0x00  MISO: 0x40


But with this code,
 Data %(1)=SPI(&HAA)
 Data %(2)=SPI(0)
 Data %(3)=SPI(0)
I'm actually sending this:
MOSI: 0xF0  MISO: 0x40
MOSI: 0x00  MISO: 0xD9
MOSI: 0x00  MISO: 0x43
...and my sensor doesn't response!
So I send hF0 instead of hAA with this command!!!
Maybe an error in "variable = SPI(data)" anyway?
Or what am I doing wrong?

Frank
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024