Hello, I'm working on control board with MC56F84763 (I'm using CW10.7 + Quickstart 2.6 to develop the application).
I faced problem with IIC interface. I'm able to write data to PCF8574 I/O Exander using following code (I'm not using ISR, just calling function in main()):
Hello Xiangjun Rong, thank you very much for your feedback. I was focused to other parts of my application in last days. Let me try your proposal in next two working days. I'll come back. Have a nice day. Peter
Hi, Peter,
i think the reading process has issue.
This is the reading process:
1)set IIC transmit mode and master mode and write slave address with WRITE mode ioctl(IIC_0, IIC_WRITE_DATA, 0x40);
2)write PCF8574 address 0x41 for port reading as data with code IIC_0_write_byte(0x41);
3)send "repeat start command"
4)rewrite the slave IIC address and set read mode for example ioctl(IIC_0, IIC_READ_DATA, 0x40);
5)read data normally
/* read data from PCF8574T */
ioctl(IIC_0, IIC_TX_RX_MODE, IIC_RECEIVE);
Hope it can help you
BR
Xiangjun Rong