1 Reply Latest reply on Jan 29, 2019 11:24 PM by DheerajK_81

    IO Expander CY8C95x0 Factory defaults

    mapic_4007076

      Hi,

       

      I have a few technical questions in regards of your IO expander chip. Looking closer at the register factory default settings, it appears that from start up all GPIO’s are configured as output and not inputs, that raises a little concern? Could we obtain more detailed information on the Drive Mode Registers. Currently they are set 0x1D to 0xFF which means that all the GPIO are Resistive high, strong low. Any chance that someone can explain this a bit better. Does this mean that a GPIO has a high resistor value to VCC and requires a strong low signal in order to pull the GPIO to a Low level?

       

      Anyway would be good to find out more  details about the options.

       

      With Regards

      Matthias

        • 1. Re: IO Expander CY8C95x0 Factory defaults
          DheerajK_81

          Hello Matthias,

           

          All GPIOs are configured as Resistive High, Strong Low by default to allow for Quasi Directional I/O. This is done so that you can use the pin as either input or output without the need for specifying the data direction in another instruction, thus saving time. However, you must take care that data collision doesn't happen by writing good software.

           

          More information on the drive mode registers can be found in the datasheet in page#12 Table 9: https://www.cypress.com/file/37971/download

           

          Based on what mode you want on the particular port, you need to use the Port Select register (18h) to specify the port and then write '1s' to the drive mode registers.

           

          For eg:

          If you select the Port Address 08h, and you want to configure the data pins in the following way:

          1st pin - Resistive High, Strong Low

          2nd pin - Strong high, resistive low

          3rd pin - High Z

           

          then this is what you would do,

          You would enter the value '08h' in the Port Select register and then do the following:

          Resistive Pull Register - 00000001 (Setting the first pin) =  0x01 ---> value will be written to 1Dh (register address mentioned in the table)

          Resistive Pull Down Register - 00000010 = 0x02 ---> value will be written to 1Eh

          High Impedance Register - 000000100 = 0x03 ---> value will be written to 23h

           

          Note if the 1s clash, then the last register written will override the one that came before. Hope this clarifies your query!

           

          Regards,

          Dheeraj