I actually doubt that 0x70 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, 0x73 or something (CMIIW).
The registers are quite a different thing.
If you read a i2c byte the reading starts at 0x00 and then the read pointer is incremented automatically after each follow-up-reading. So if a i2c device has 10 registers starting at 0x00 you will reach the register number 0x05 by reading 5 bytes one after the other.
For the PCF8574 simply start reading 2bytes starting at register 0x00;
the 1st byte contains the ack byte, the 2nd byte contains the bit I/O pattern.
Anyway, f your code works by addr 0x70 using NXC it’s surely valid. Then it’s just a Mono source code issue.
- This reply was modified 6 years, 11 months ago by Helmut Wunder.