DIY RAM Memory- Register Style




Introduction: DIY RAM Memory- Register Style

About: I like to make things that move, sense, calculate, compute, blink, and make noise. I like making things that create high voltages, electrical arcs, and can light fluorescent bulbs at a distance. I like to d...

**UPDATE** I also made a CMOS version here:
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
Some wire
Pliers are a great help for placing wires in tight places

Step 2: What's Going On?

The basis of the circuit is the SR Flip Flop.  This flip flop circuit uses 2 inputs, Set and Reset, to control 2 outputs, Q and ~Q (not Q).  When the Set line goes high, Q will go high and stay high even after Set goes low.  If, however, Reset goes high, then Q will go low and ~Q will go high. 

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

So now that you know what is going on, we can begin to construct the circuit. When starting the construction, I would recommend placing the NOR gate transistors on the board first. it makes things much easier as you go along. The output transistor is needed because there isn't enough power to drive the led brightly.  If you notice, it is an inverter in the circuit diagram, however, whether or not you have to invert the signal going to the led is based on which NOR gate you take the output from.  If the led's state is opposite of that of the data input, then you must either change which NOR gate you take the signal from, or change the transistor's output (inverted, or non-inverted).

Step 4: You're Finished

Now, you should have a working register! If you don't check your wiring very closely, any mistake could produce very undesirable results.

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,



    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest
    • Water Contest

      Water Contest

    89 Discussions

    has no MCU , you dont need to program this. Its all done through hardware


    2 years ago

    I don't really understand this circuit. Where would you connect the resistors and the switches and the LEDs. How would the LED glow, indicating the previous state and present state, as in a shift register.

    I don't get the transistor that is connected to the led because the emitter is connected and also the collector to the led.If i connect the ground to the emitter which is negative and if i connect the positive to the collector it is going to be short circuited.I hope you will understand what i mean.

    This is really cool and I built one on my breadboard following your schematic. (I only build 1 bit, just the minimum following your schematic.) Just to be sure, when i power up the circuit my LED is in an 1 state. When I push the momentary switch the LED remains in its current state. When I switch the DIP-Switch to the other position, and press the momentary-save switch, the led goes to the 0 state. And the same happens in the opposite 0 to 1 state. Im really trying to understand logic gates and computers more deeply and flip flops are new to me. Is what i described proper operation? Thanks so much.

    How much are you talking?? Bits, bytes, kilobytes, megabytes??? If you want to store more than a few bits or a byte, its not practical.

    That's interesting, so it is drawing a lot less current then my circuit at 15-20mA per bit. What ate the values of your resistors? I used 1k ohm for everything, mainly because they were what I had available. If I had a bunch 10K's or 100K's I would have used them instead.