2024-01-12 03:50 AM
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.
2024-01-12 04:38 AM
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.
2024-01-12 04:38 AM
Either contact the manufacturer or write a software program that goes through all addresses of 0x00 - 0x7f ?
2024-01-14 11:11 PM
I've tried running I2C scanner on an arduino to find out the address and it came out to be 0x6D.
2024-01-15 12:02 AM - edited 2024-01-15 12:11 AM
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
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 .
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.
2024-01-15 03:37 AM - edited 2024-01-15 03:38 AM
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.