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.

TCA9535: The way to output H

Part Number: TCA9535

Dear Specialists,

My customer is evaluating TCA9535 and encountering the problem.

I would be grateful if you could advise.

---

Regarding TCA9535DB,we'd like to know the command to output H

I have performed the following operations and checks, but H is not output.

①40h, 02h, FFh, FFh

Each port voltage (4pin P0, etc.) 0V

②40h, 02h, 00h, 00h

Each port voltage (4pin P0, etc.) 0V


Whichever command I ran, the output of each port is 0V, not 5V.

Is the send command wrong?


TCA9535DB power supply 5.0V, INT terminal 4.7k pull-up

Address port A2 = A1 = A0 = 0V

Each port is pull-down, but I checked it even in the open state

I2C communication speed is 100kHz, pull-up resistance is 2.2k and 4.7k

I am checking the command transmission on the I2C monitor.


Also, about reading

It can be read correctly at 46h and 00h.

(A2 = 0V, A1 = A0 = 0V)

I appreciate your great help in advance.

Best regards,

Shinichi

  • The default configuration of all pins is as inputs. You did not mention any writes to the configuration registers (6/7).

  • Shinichi,

    Just as a note, I know you already understand most of this. I am making this extra detailed incase another customer finds your thread and is also confused on how to program this device.

    Every time you write to the configuration registers you have to send a full write:

    For your configuration of A0=A1=A2=0V the address will be 0b0100000. With the write bit included the first byte that you send is 0x40. I saw you write that above so I assume you did that part correct.

    You then have to write to 2 different registers. The first register is the configuration registers (0x06, 0x07). This register will allow you to choose which pins are inputs and outputs. A 1 in this register is an input and a 0 in this register is an output. 

    With this device it is possible to program both ports right after the other using the write pattern below:

    You still write the address of the device but you write to the first register of the pair and you then send your byte for port 0 and after the ACK you send the byte for port 1.

    After you set the ports as output pins you can then write data to the output port registers. This can be found in output port registers (0x02,0x03). Writing a 1 to this bit will make the pin go high and writing a 0 will make the pin go low.

    So after all is said and done here are the two write patterns that you have to follow:

    1. 0x40 | 0x06 | 0x00 | 0x00
    2. 0x40 | 0x02 | 0xFF | 0xFF

    Let me know if you have any questions and if this works.

    Best,

    Chris

  • Hi Chris,

    Thank you for your reply.

    It looks like the port wasn't set to output.

    I'll share this information with the customer.

    If they have an additional question, I consult you again.

    I appreciate your great help and cooperation.

    Best regards,

    Shinichi

  • Hi Chris,

    The customer could solve the problem.

    They forgot to set the port with output.

    So let's close this thread.

    I appreciate your great help and cooperation.

    Best regards,

    Shinichi