我能使用这个芯片的写操作,但是没法使用读操作。我按照芯片手册编写读寄存器代码,但是无论哪个寄存器得到的都是0xff,正常来说,极性反转端口寄存器的默认值应该是0,但是我读该寄存器时得到的却是0xff
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.
我能使用这个芯片的写操作,但是没法使用读操作。我按照芯片手册编写读寄存器代码,但是无论哪个寄存器得到的都是0xff,正常来说,极性反转端口寄存器的默认值应该是0,但是我读该寄存器时得到的却是0xff
你看看下面文档是否有帮助。
你似乎正在尝试读取0x01寄存器,该寄存器是输入端口1寄存器。 此值应为0xFF,因为TCA9555在每个IO上实现100k上拉。
要读取极性反转寄存器,我想你要读取0x04或0x05。
It looks like you are attempting to read the 0x01 register which is the input port 1 register. This should read 0xFF since TCA9555 implements 100k pull-ups on each of the IO's.
To read the polarity inversion register, i think you are wanting to read 0x04 or 0x05.