Can 16C54 handle 30 input pins?

Status
Not open for further replies.

asfmag2003

Newbie level 2
Joined
Aug 8, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
Hi

I have to write a micro-controller program to scan 30 input pins. I only need to know whether they are high/low and the speed can be very slow. But the problem is that 16C54 does not have so much input pins.

I have searched from the Internet that there are matrix for keyboard input. However, is it possible to use matrix or other design so that I can reduce the input pin count ?

Thank you in adavnce.
 

how about I/O expnasion?
you can use I2C or SPI, or simple shift-registers

if you have 30 inputs (no outputs) you can use 4x 74ls165 and connect them over 3 lines (data
_in, clock and load)
 

    asfmag2003

    Points: 2
    Helpful Answer Positive Rating
or a simple mux, or a series of mux will do.
 

Thank for your replies. I am a newbie to electronics. If I use 4x74ls165, I need to assign :
1 input pin for clock, 1 input pn for data in and 4 inputs for 74ls165's output.
Is my interpretion correct ?
 

https://ee.usc.edu/ee459lib/datasheets/DM74LS165.pdf

8-Bit Parallel In/Serial Output Shift Registers.

each 74ls165 can give you up to 8 inputs... (8x4=32 inputs suggested)

to communicate to one 74ls165 you need on the microcontroller
- 1 input for data. (pin 9 on '165)
- 1 output for clock. (pin 2 on'165)
- 1 ouput for load (pin 1 on '165)
optional 1 output for clock inhibit (pin 15, on '165... i would leave it connected to GND)

after yo can communicate with one 74ls165, you can cascade the other three... just connect clock to clock pin, load to load pin, (optional inhibit too) aaaannnnddd serial out to serial in (pin 10)
is well suggested to connect the last Serial input PIn (pin 10) to gnd at the last stage....

 

    asfmag2003

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

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…