About PCA6416A (IO Expander)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About PCA6416A (IO Expander)

341 Views
Manohar_t
Contributor I

Hi all,

We are using the PCA6416A (IO Expander) to check the GPIO status in our project, with a microcontroller(TI MSP430F5358) and using the default configuration.

While validating the IO Expander, we are reading the pin state and connecting some of the GPIO (port 0 and 1) pins to the ground to check the state of the pins, while reading the data from it for every 2 seconds the values are coming 0xFF but after some iteration of reading only once it is giving correct values after that again starts giving 0xFF. Is there any reason for this, we are reading the ports in pairs only.

0 Kudos
2 Replies

324 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Manohar,

I have not heard about such a problem before.

Could you please share oscilloscope plots of the reads from the PCA6416A? In addition to the reads on the SDA and SCL pins, please also show the GPIOx and VDD signals.

Please can you share also the schematics showing all the signals connected to the PCA6416A device?

What is the status of the power supply when you read the states of the PCA6416A I/O pins and get the “incorrect” states?

Best regards,

Tomas

0 Kudos

286 Views
nibzy26
Contributor I

Hi,

I am having trouble reading from the input pin and not sure what registers to set before reading the input register 0x00 as I have configured P0_2 pin as Input.

Actually I am trying to figure out the registers to read for the input side.We cant just read registers 0x00 and 0x01 directly as we have to set other registers first and this is the issue , I am not sure which registers to set before reading the input registers 0x00,0x01
Heres what I do
 
1. set register 0x06 to 0x04 as I need the third bit (P0_2) as input .
2. I set register 0x46 to 0xFF to enable pullup/pulldown  
3. i set register 0x48 to oxFF to select pullup .
 
Then I read the state of (P0_2) to see if it is one or zero by reading 0x00 register but its not returning the right value instead the value in 0x00 is the same as the output register (0x02).whatever value i set in 0x02 register , it gets copied to 0x00 register 
so i just need to know what registers to set before reading input registers 0x00.
 
Please advise
 
Thanks
 
Nabeel
0 Kudos