Skip to main content
Associate
January 12, 2024
Question

I2C communication with pressure sensor

hi, I'm trying to connect this pressure sensor (WF100DPZ) using I2C with stm32 f070RB. But can't understand what address to use for this sensor after reading the datasheet. It'd be great if anyone could help. 

This topic has been closed for replies.

5 replies

######
Senior II
January 12, 2024

I can't immediately see the address in the linked datasheet - unless its the actual part ID itself?

Alternatively...

You could try searching for I2C Address scanner example code.

Basically if an I2C address is unknown you can loop through each valid address waiting for an ACK on IfDeviceReady (or similar).

You can then deduce that the addresses that are ACKing are valid device addresses.

BME104Author
Associate
January 15, 2024

I've tried running I2C scanner on an arduino to find out the address and it came out to be 0x6D. 

######
Senior II
January 15, 2024

Ok, so has that worked?

I think because of the Read Write bit it would actually be an address of 0x6C 01101100 and then the LSB changes to 1 or 0 (9x6D or 0x6C) for Read and Write respectively. 

Sebastiaan
Associate II
January 12, 2024

Either contact the manufacturer or write a software program that goes through all addresses of 0x00 - 0x7f ?

AScha.3
Super User
January 15, 2024

Hi,

obviously the producer of this WTF sensor does not know, what he/she is producing, or dont want to tell it.

I would throw it to the trash - and use a sensor from manufacturer that can write a datasheet, like ICP-10100, PSA071040, DPS310XTSA1 etc..

But here : from "datasheet"  :flushed_face:   ->  reg 00 : default 00

AScha3_0-1705305206565.png

chip has CS , so its starting in spi 3 wire mode :  CS , SCK , SD . 

So i would try : just write/read in spi mode , CS can try with hardware NSS , maybe it works; if not soft NSS .

AScha3_1-1705306264551.png

 

 

OR: set CS lo , try I2C on scl + sda , no chip address , just register number + read/write one byte .

But better chance is spi mode , because nothing written about how to switch to I2C mode in ds.

If you feel a post has answered your question, please click on " Best Answer ".