Read 16 Digital Inputs with 4 GPIO?

Status
Not open for further replies.

digi001

Full Member level 5
Joined
Apr 5, 2011
Messages
244
Helped
22
Reputation
44
Reaction score
21
Trophy points
1,298
Visit site
Activity points
2,904
I am looking to read 16 digital inputs using only 4 GPIO Lines.

This would be straight forward using an Encoder if i could guarantee that only 1 of the 16 lines can be active at a time. However any combination of these may be possible.
How could I accomplish this?

I think if I scan the lines with 4 Reads I should be able to decode this problem. Do they make chips to do this?
 

What is the MCU or processor you are using in your design?

You could implement SPI in hardware or software and use a SPI port expander, there are several available with 16 GPIO.

BigDog
 
I am looking to read 16 digital inputs using only 4 GPIO Lines.

I think you can use SPI input shiftregisters for this one you only need to have 3 PIns to read all the 16 inputs or more..
 
Reactions: digi001

    digi001

    Points: 2
    Helpful Answer Positive Rating
Last edited:
Reactions: digi001

    digi001

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…