I've been working on a project with an Arduino. I need to use many TCRT5000 IR modules and I'm out of pins. I also used a DC motor driver shield and it also took a lot of pins.
Now I need to increase my two or three pins to lot more with a 74HC574n flip-flop module. I was going to buy a 74HC595 but I made a mistake and now I have a 74HC574n. It is not possible to buy the one I wanted, so I have to use what I already have.
Any ideas about it? I would be pleased if you could help me. Thanks.
-
\$\begingroup\$ You want an "I/O expander". i.e. mouser.com/c/semiconductors/interface-ics/… You're welcome :) \$\endgroup\$Kyle B– Kyle B2022年07月22日 07:14:50 +00:00Commented Jul 22, 2022 at 7:14
-
\$\begingroup\$ I guess it'll work with those I/O expanders. I'll try that too. But for now I need something like a module or something that it is ready and doesn't need to prepare it to use. Also I prefer to use this IC that I already have if it is possible. I can't buy the exact same thing that you're telling me to buy. because I'm in Iran and there isn't much rare things. @Kyle B \$\endgroup\$Ali Ata Hashemi– Ali Ata Hashemi2022年07月22日 07:29:34 +00:00Commented Jul 22, 2022 at 7:29
-
\$\begingroup\$ You say you want to expand the inputs, but the 595 would allow you to expand the outputs (it has no parallel inputs). What are you really trying to do? Expanding inputs or outputs or both? \$\endgroup\$LorenzoDonati4Ukraine-OnStrike– LorenzoDonati4Ukraine-OnStrike2022年07月22日 11:14:07 +00:00Commented Jul 22, 2022 at 11:14
-
\$\begingroup\$ Yes Umm I want to expand the inputs but also its ok if I find out a way to expand outputs. \$\endgroup\$Ali Ata Hashemi– Ali Ata Hashemi2022年07月22日 19:46:49 +00:00Commented Jul 22, 2022 at 19:46
1 Answer 1
If you can only use 74HC574n parts, and you know how to do it with 74HC595 parts ...
74HC574n is 8 D FFs with a common clock.
74HC595 is a serial-in, parallel out register.
Use one 74HC574n to make a shift register. Wire the Q out to the next D in. You need 2 MCU pins, D and serial Clock.
Use a second 74HC574n for the latch. The Data comes from the first part. You need 1 MCU pin to clock the second FF and latch the data.
Three MCU pins total. Less efficient, for an 8-bit output port, you need 2 20-pin parts instead of 1 16-pin part.
Explore related questions
See similar questions with these tags.