Despite Christopher's help (thanks to him, btw), I am still having trouble interrogating the SCD41 sensor with IOWarrior24 (yeah I know it's deprecated, sorry). So I am listing my questions here in the hope that a good soul will answer them :-)
The chip returns an ID=2 Report with an error flag set (0x80), and 0 data bytes.
1) I think that means that the slaved does not even acknowledge the 1st data byte (otherwise I would have data count >0).
Am I correct?
2) I have soldered the chip according to Sensirion docs with 10kOhms pull-up transistors for the SDA and SCL pins. The chip is powered with +5V
=> should I disable the pull-up transistors of the IOWarrior when calling the IIC Special Function?
3) Christopher told me that to start a measurement, I have to send a report as follows:
Code: Select all
report-ID = 0x02 report Byte 1 = 0xC4 flags: start, stop, 4byte of data report Byte 2 = 0x62 i2c address (write) report Byte 3 = 0x21 register "start periodic measurement" (msb) report Byte 4 = 0xb1 register "start periodic measurement" (lsb)
https://sensirion.com/media/documents/C ... asheet.pdf
4) According to Sensirion, when writing a command (master->slave, i.e. IOWarrior->SCD41) that is to be followed by a read (slave->master), the command sequence should start with a START bit, while the STOP bit should only be sent (Master->Slave) when all data has been received from the slave.
Does that mean that the stop flag should be set to 0 in the flag byte of the Report? (again, that's the opposite of Christopher's example)
5) Could someone tell me, looking at the docs, whether this sensor is strictly I2C compliant, or does it use a Sensirion variant (such as Sensibus), or a "clock stretching handshake"?