Unable to write Port 1 in PCAL6416A

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write Port 1 in PCAL6416A

136 Views
Contributor I

Hello,

We are able to read Both Port 0 & Port 1 in Input Mode, but we are not able to set and reset some pins in  Port 1 for output mode

0 Kudos
3 Replies

126 Views
NXP TechSupport
NXP TechSupport

Hello Dheeraj,

 

In order to configure Port x for output mode, the following registers should be initialized:

 

Capture_0.JPG

 

Capture_1.JPG

 

Capture_2.JPG

 

Capture_3.JPG

 

Capture_4.JPG

 

So for Port 1, you should configure registers 0x4F, 0x47, 0x49, 0x07 and 0x03. 

 

I hope it helps. If not, please let me know how you set the registers 0x4F, 0x47, 0x49, 0x07 and 0x03 to achieve your required configuration .

 

Best regards,

Tomas

119 Views
Contributor I

Thank you Tomas for your response!!

Can you share the values to be configured to make port 1 as output mode with respect to the registers that you have mentioned above.

Below is the configuration that we have done

RegisterValueMode
Configuration Register (06h)0xFFInput Mode
Pullup Enable Register (46h)0xFF 
Pullup Enable Register (47h)0xFF 
   
Configuration Register (07h)0x00Output Mode
Pullup Selection Register (48h)0xFF 
Pullup Selection Register (49h)0xFF 
Output Port Configuration Register (4fh)0x02 

 

Let me know any changes needs to be done in Configuration

Regards,

Dheeraj

0 Kudos

112 Views
NXP TechSupport
NXP TechSupport

Hello Dheeraj,

 

Looking at your configuration, you set all P1 I/Os as open-drain outputs with 100k pull-up resistors. Is this what you want to achieve? 

As I highlighted before, it is recommended to program the register 0x4F before settings the P1 I/Os as outputs. 

Are you now able to set/reset P1 outputs using the the register 0x03? If not, please let me know which outputs do not work and what is connected to them.

 

Best regards,

Tomas

 

0 Kudos