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):
- Memory, previous state:
Q0=0, Q1=1, Q2=1, Q3=0
- Arduino: Set pin17 (D2) to High -> Memory: Waiting new data.
- Arduino: Set pin16 (D3) to High -> Mux: Pass the value to memory at D0
- Memory: Read 1 on D0 (this is my doubt. D1, D2 and D3 don't matter ?)
- Arduino: Set pin17 (D2) to LOW -> Memory: Save new data
- Memory, new state:
Q0=1, Q1=1, Q2=1, Q3=0
? orQ0=1, Q1=0, Q2=0, Q3=0
?
Question 2: Are this correct ? Question 3: Are there a more efficient way to do this?
Notes:
- 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.