First, please be patient, I'm not electronical person. I am learning Arduino and electronics for hobby and this is my fist time with integrated circuits.

  • Situation: I'm want to extend the Arduino Nano pins (De/Multiplexer) and keep the state (High/Low) of the new pins until I decide to change it again. For keep the states I think that D-type Flipflop memory-based system can help .
  • Question 1: On this system can I change only one bit with a unique signal or need to set all bit states ?
  • Example (reference image):
  1. Memory, previous state: Q0=0, Q1=1, Q2=1, Q3=0
  2. Arduino: Set pin17 (D2) to High -> Memory: Waiting new data.
  3. Arduino: Set pin16 (D3) to High -> Mux: Pass the value to memory at D0
  4. Memory: Read 1 on D0 (this is my doubt. D1, D2 and D3 don't matter ?)
  5. Arduino: Set pin17 (D2) to LOW -> Memory: Save new data
  6. Memory, new state: Q0=1, Q1=1, Q2=1, Q3=0 ? or Q0=1, Q1=0, Q2=0, Q3=0 ?

Question 2: Are this correct ? Question 3: Are there a more efficient way to do this?

enter image description here


  • I used a simulator to diagramed the memory based on this datasheet: https://pdf1.alldatasheet.com/datasheet-pdf/view/8337/NSC/74273.html It seems that it is possible, but I want to be sure.
  • My currently solution is use separated flipflops, but I want to simplify it.
  • Connections on reference image are simplified.
  • Sorry about the poor diagram, I don't know programs for beautiful electronical diagrams.
  • Sorry about typos, not-native English person here.
  • 1
    I don't want to answer in a comment, but have you heard of the 74HC595 chip? That lets you set up 8 outputs using only 3 pins from the Arduino, and they can be chained. That looks simpler than your proposal.
    – Nick Gammon
    Sep 9, 2021 at 6:41
  • 2
    Or if you want even fewer outputs used you could consider an I2C IO expander like the MPC23017.
    – Majenko
    Sep 9, 2021 at 8:42
  • 1
    feeding demux into the latch will not let you set output pins to various states
    – jsotola
    Sep 9, 2021 at 14:11
  • There is a simple and cheap component that can do what you want, the 74HC259 addressable latch. Essentially it's demux and an 8-bit latch in which the bits are individually addressable.
    – StarCat
    Sep 9, 2021 at 15:12
  • Look at the data sheet of the '273: You cannot set its flip-flops individually. All or none, that's it. Use another IC. Sep 10, 2021 at 6:16

1 Answer 1


Question 1 and Question 2: I was wrong, this is not the correct way. @jsotola and @the_busybee, thanks for the clarification

Question 3: @Nick_Gammon and @Majenko I think you are right, using i2c are more efficient ways to do. But, the @StarCat proposal is more compatible with my current solution. 74hc259 allows me set the state one by one and keep it until I change it again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.