I actually doubt that 0×70 is a valid register number.
It’s more supposed to be the device address, but there are several different PCF8574s out there with different device addresses like, e.g., 0x4E, 0×73 or something (CMIIW).
The registers are quite a different thing.
If you read a i2c byte the reading starts at 0×00 and then the read pointer is incremented automatically after each follow-up-reading. So if a i2c device has 10 registers starting at 0×00 you will reach the register number 0×05 by reading 5 bytes one after the other.
For the PCF8574 simply start reading 2bytes starting at register 0×00;
the 1st byte contains the ack byte, the 2nd byte contains the bit I/O pattern.
Anyway, f your code works by addr 0×70 using NXC it’s surely valid. Then it’s just a Mono source code issue.
- This reply was modified 2 years, 8 months ago by Helmut Wunder.