Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
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..
 
  • Like
Reactions: digi001

    digi001

    Points: 2
    Helpful Answer Positive Rating
ShftInExmp2_Schem[.jpgTwo cd4021 will give you 16 inputs(16 bit).
Arduino - ShiftIn
http://www.redrok.com/CMOS_CD4021BC_8-StageStaticShiftRegister_Fairchild.pdf

MCP23017 it is a GPIO expander and has also an open collector interrupt pin that is activated on port pins state chenge.
**broken link removed**
 
Last edited:
  • Like
Reactions: digi001

    digi001

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top