This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA6408A: 驱动

Part Number: TCA6408A

你好,

        我在写tca6408这个扩展芯片驱动时,输出配置可以控制引脚了,但是配置输入时候没有测试成功,我通过给p1脚一个3.3v电压,然后读回引脚状态,但是引脚状态始终为0,图中是我的代码,请问是不是这样写的?

  • 您好,抱歉回复晚了,我想您读取的时序应该不对的。P1引脚给了一个高电平, 那么寄存器bit1应该读取为高电平,在读之前,应该先有一个对寄存器进行写的操作,不能直接读。时序是这样的:

    Start+7 bit slave address+Write0+ACK+Register address(Register0)+ACK+Restart+7 bit slave address+Read(1)+ACK+Register 0 data

x 出现错误。请重试或与管理员联系。