If you have ever looked at a microcontroller's datasheet, you have probably seen something about registers. Registers are little one or two byte memory storage units in microcontrollers. The register in this instructable can hold 3 bits of data (b/c I ran out of room on my breadboards) using transistors. I did this to prove that I can, however, its not practical as an 8 bit register requires 64 transistors, about 64 resistors and lots of space.
The register is a neat device. It can recieve data when the enable input is, in my circuit, low and it can then latch and save the data even it the data line is changing. My circuit is not the conventional D-type latch because it used more transistors than I had.
Step 1: Materials
The materials for this project are quite simple as it is a prototype kind of project.
8 NPN transistors for each bit - mine is 3 bits (do the math)
8 resistors for each bit - 1K for the supply connection and 1K or more for signal. get a few more (you will need some more)
A pushbutton switch - N.O.
A DIP switch - at least 4 switches
A solderless breadboard - if you dont have one then your missing out because these things are great
An LED for each register to display the stored bit
Pliers are a great help for placing wires in tight places
Step 2: What's Going On?
Now the question becomes how do we make all of this happen with only one input? We do this by connecting the data line to the Set input and connecting it to the Reset line through an inverter.
So far, when Data is high, Set is high and Reset is low so Q is high. If Data goes low, then Set goes low and Reset goes high making Q go low and ~Q go high. Now we have another problem. The register changes states when the Data does, it doesn't latch like we want it to. How do we fix this? By adding a Write Enable. We can do this by adding a gated buffer. It acts as a switch so if the switch line goes high or low the buffer will either turn off or on, respectively. Now, even when the data line can change states, the data can remain the same.
Step 3: The Circuit
Step 4: You're Finished
If your are familiar with registers, you may be asking why I didn't go with the conventional D-Flip Flop or D-Latch. The main reason is that I wanted to challenge myself. I did't want to get online and look up a circuit, i wanted to design my onw. I would also need another transistor for each bit in order to make a D-Flip Flop. So in my opinion, i made an efficient circuit.
I will be remaking the circuit with MOSFETs in a CMOS arrangement so check it out when I finish it!!
***Check out my "macroelectronic" 4 bit calculator, https://www.instructables.com/id/4-Bit-Binary-Adder-Mini-Calculator/