Is there a 16-bit GPIO expander that can latch all 16 inputs at the same time?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a 16-bit GPIO expander that can latch all 16 inputs at the same time?

Jump to solution
983 Views
robertgbaruch
Contributor II

When I read the datasheets for parts like the PCA9555 or PCA9698, it seems that when you read a port, the port is latched at that point, then the data is transmitted on I2C. But I want to latch the state of ALL ports and then get the data. Is there a part that can do this? Or do I have to insert a latch between my inputs and the GPIO expander?

Tags (1)
0 Kudos
1 Solution
716 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi

According your describe above,we don't have same device for recommend about control function ICH bit for select.

View solution in original post

0 Kudos
3 Replies
716 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi,

Basically the GPIO expander  has same latch feature which is selected by bit setting--lock changes on input pins until the input register is read.

When input latch register bit is 0,the input values are not latched and change in input generates an interrupt but interrupt can go away if the input changes back.

When input latch register bit is 1,the input values are latched and change in the input generates an interrupt but the interrupt will not go away if the input changes back and interrupt only clear after the register is read.

0 Kudos
716 Views
robertgbaruch
Contributor II

Hi,

I don't think that is what I'm looking for.

Take a look at the datasheet for the PCA9555, figure 27. We can see that when you want to read ports 0 and 1, the data you get is not from when you start the command, but the moment the ACK happens. You cannot read the state of ports 0 and 1 at the same moment in time.

Now look at the datasheet for the PCA9598, section 7.7. There is an OCH bit which allows you to make each port in a single chip output its updated values at the same time. It can even cause multiple chips to change their output values at the same time. However, there is no corresponding bit for inputs. Suppose I had a 32-bit bus and I wanted to read the state of the bus at a point in time. I can't do it -- I have to read the low 8 bits, then the next 8 bits, and so on. In the meantime, the bus could change value, and I'll end up with invalid data. If only there were an ICH bit!

So it seems that if I want to read more than one port at a time, I have to add an external latch the data before the PCA chip. Then I can read the ports and get valid data because the external latch will not change state while I'm reading it.

My question is: is there a PCA series chip that has the equivalent of this external latch or an ICH bit?

Thanks!

--Rob

0 Kudos
717 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi

According your describe above,we don't have same device for recommend about control function ICH bit for select.

0 Kudos