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.

TCA9534: must configure again before writing IO

Part Number: TCA9534


Hello,

I am using tca9534 as my IO expansion port to control a digital tube, now I have configured all the IO ports as output ports, I can set these IO ports to the number I want, I have read the datasheet of tca9534, I only need to configure the IO port once and then I can set the value. But in fact, every time I write the corresponding value, I need to configure the IO port again, may I ask why?
My understanding of normal operation looks like this:
cfg_io_as_output();
write_digital_tube(1);
write_digital_tube(2);
...
In fact:
cfg_io_as_output();
write_digital_tube(1);
cfg_io_as_output();
write_digital_tube(2);
...

Thanks.

  • I do not know what these functions do. What are the actual register accesses?

  • Hi Jianxi,

    I don't know what your code is doing. I can't tell from the functions you have listed here to what the underlying code is doing. 

    The TCA9534 should keep the output state as long as the device was configured and is still powered. A power reset will reset the internal registers to the default state. 

    Do you have scope shots you can provide of the SDA, SCL, and P-port pin? 

    Regards,

    Tyler