Reply To: I2C communication PCF8574AP

HomeForumsMonoBrick EV3 FirmwareI2C communication PCF8574APReply To: I2C communication PCF8574AP

#4876
Author Image
Helmut Wunder
Participant

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 9 years, 6 months ago by Author ImageHelmut Wunder.
Posted in

Make a donation