Design of 8-bit shift register

Thread Starter

GAC19

Joined Mar 8, 2020
16
Hi! I'm a student of Electric Engineering and I got a problem on a Electronic project. I have to make an 8-bit shift register with serial input and serial output. The basics of the project is that it has to have two push buttons: one will be a logic 1 and the other a logic 0. The shift register has to somehow show the 'move' of the register to see that it works, so I planned on using 8 LEDs that will work like this: when I press button 1, it has to turn on a LED and when I press 0, the LED has to turn off. If I make a secuence, for example, 01100101, being the first 0 the last bit I pressed and the last 1 the first bit, the LED configuration shall be the same: Off - On - On - Off - Off - On - Off - On. The hard or difficult part of the project is that I'm not allowed to use any type of IC nor Digital Electronic, just transistors and pasive components. I attach my previous design, there can be seen the configuration of the two pulses and two masters slaves but the connection of the rest of the masters slaves was the same, it didn't work as I thought it will be, LEDs automatically turn on (except the first one) when I start simulating or when I connect the circuit in protoboard. I was trying to use a Master-Slave configuration to make it work, the clock and input D I assumed that should be separated, that's why I put a relay to separate them. The logic 1 I made it by energizing input and clock with the same pulse, while the logic 0 I made it by just enegizing the clock. I was using 2N2222A transistors in that task in NAND and NOT configurations. If you could help me or give some ideas I would really appreciate. Thank you!
 

Attachments

dl324

Joined Mar 30, 2015
16,839
The hard or difficult part of the project is that I'm not allowed to use any type of IC nor Digital Electronic, just transistors and pasive components.
Are you allowed to use MOSFETs? The design would be simpler because you wouldn't need resistors.

EDIT: An easier to read version of your schematic. For future posts, please turn off the grid and print with a white background (and black foreground):
1583714538469.png
 
Last edited:

Thread Starter

GAC19

Joined Mar 8, 2020
16
Are you allowed to use MOSFETs? The design would be simpler because you wouldn't need resistors.
Yes, I'm allowed to use FETs but I'm not familiar with them. How would it be with MOSFETs? Thank you for your response.
 

WBahn

Joined Mar 31, 2012
29,976
Your description of what you are proposing needs some work.

If all you have is two pushbuttons and makes something (I couldn't tell what the something was, but it seems like its your input data) a 1 and the other makes it a 0, then how do you deal with two 1's or two 0's in a row? Are your pushbuttons also clocking the circuit?
 

Thread Starter

GAC19

Joined Mar 8, 2020
16
Your description of what you are proposing needs some work.

If all you have is two pushbuttons and makes something (I couldn't tell what the something was, but it seems like its your input data) a 1 and the other makes it a 0, then how do you deal with two 1's or two 0's in a row? Are your pushbuttons also clocking the circuit?
Yes, the pushbuttons are also clocking the circuit. The "something" I intend to do is to turn on a LED when my input data is a 1, and turn it off when there's a 0 (This button just affects the clock). When there's a secuence of 1 ans 0's the LEDs shall turn on or off, depending on the secuence. When I press a "1", the first LED turns on. Then, if I press another 1 or a 0, the first LED should take turn on or off depending on the number I press, and the second LED should take the previous value of the first LED, and so on until The 8-bit register is full.

Here is a link where it can be seen better: https://easyeda.com/alexander_2000/Proyecto-E1
 
Last edited:

dl324

Joined Mar 30, 2015
16,839
How would it be with MOSFETs?
If you're not familiar with them, you shouldn't use them. That would be a dead giveaway that it's not your work.

Could you post the logic diagram you used to make the schematic you posted? It'll save me the bother of having to reverse engineer the logic.
 

Thread Starter

GAC19

Joined Mar 8, 2020
16
If you're not familiar with them, you shouldn't use them. That would be a dead giveaway that it's not your work.

Could you post the logic diagram you used to make the schematic you posted? It'll save me the bother of having to reverse engineer the logic.
Well, actually I made a research but there was no information about doing it with transistors (not that I could understand). So, I used this https://www.electronics-tutorials.ws/sequential/seq_5.html as a reference of how to do the SISO shift register, then I read about the structure of the master slave here https://www.electronics-tutorials.ws/sequential/seq_4.html Then, I researched about the typical transistor's gates. So, I make it by using the basic structure of those gates and just connecting them like they showed.
 

dl324

Joined Mar 30, 2015
16,839
So, I make it by using the basic structure of those gates and just connecting them like they showed.
It would be helpful if you showed us the gate configuration you copied.

Since you're not giving me the information I asked for, it looks like I'll have to figure it out myself. Can you clarify whether the crossings circled in green are connections?

To make discussions easier, I've drawn boxes around all of the NAND gates and have labeled them 1-22.

clipimage.jpg
I think I can figure out whether the other crossings are connections.
 

Thread Starter

GAC19

Joined Mar 8, 2020
16
It would be helpful if you showed us the gate configuration you copied.

Since you're not giving me the information I asked for, it looks like I'll have to figure it out myself. Can you clarify whether the crossings circled in green are connections?

To make discussions easier, I've drawn boxes around all of the NAND gates and have labeled them 1-22.

View attachment 201087
I think I can figure out whether the other crossings are connections.
So sorry, I misunderstood. This is the one I used for NAND https://en.m.wikipedia.org/wiki/NAND_gate I used the NAND gate as a NOT just by energizing the two bases of the gate with the same input. The green circle after the 6th gate, there's no connection there. The circle after the 8th is a connection as in the 19th. I don't know if you could enter the EasyEDA link where it can be seen better or is it another way to show it better. Thank you.
 

dl324

Joined Mar 30, 2015
16,839
I don't know if you could enter the EasyEDA link where it can be seen better or is it another way to show it better.
I didn't follow the link. Schematics should make it clear when there are connections and when there aren't.
 

dl324

Joined Mar 30, 2015
16,839
Okay. I slogged through your design and think I've found the wiring error.

Does the first stage work correctly?
 

dl324

Joined Mar 30, 2015
16,839
Yes, the first one does. The rest don't.
Can you troubleshoot the circuit and find out why the second stage doesn't work?

This should show you that neatness matters and that you should use a modular design approach. Once you had one master-slave flip flop working, it should be a simple matter to array them to 8 bits.

EDIT: added master-slave qualifier.
 
Last edited:

Thread Starter

GAC19

Joined Mar 8, 2020
16
Can you troubleshoot the circuit and find out why the second stage doesn't work?

This should show you that neatness matters and that you should use a modular design approach. Once you had one master-slave flip flop working, it should be a simple matter to array them to 8 bits.

EDIT: added master-slave qualifier.
That's the strange part, all the circuits are the same. I did first one master-slave flip flop that worked, then I added another one and so on until I had 8 of them. But it was working well in simulation , then I passed it to the protoboard (I tried two master-slave together) and didn't work. When I pressed just one pulse 1, both LEDs turned on. The pulse 0, however, did work. When I pressed 0, the first LED turned off. Then, if I pressed again 0, the second LED turned off too. So I thought that maybe the transistor model that I used affected (2N2222A), I changed it in the simulator (I was previously using the ideal model of NPN) and nothing worked as supposed. All LEDs except the first one turned on instantly. It was the same design, but didn't work neither on protoboard nor in simulation. The protoboard I checked it many times, I built it many times too. So I don't know what could be the mistake.
 

dl324

Joined Mar 30, 2015
16,839
That's the strange part, all the circuits are the same. I did first one master-slave flip flop that worked, then I added another one and so on until I had 8 of them. But it was working well in simulation
Is the original schematic from your simulator? If so, then the circuit wasn't working.

then I passed it to the protoboard (I tried two master-slave together) and didn't work.
Obviously there's a wiring error. If you have a working simulation, you should be able to use that to troubleshoot your wiring.

Without a working simulation, you could still troubleshoot the old fashioned way; like I did.

What I observed from your design is that the all of the MS flip flops have more gates than necessary. Will you have credit taken away for that?
 

Thread Starter

GAC19

Joined Mar 8, 2020
16
Is the original schematic from your simulator? If so, then the circuit wasn't working.
Yes, it is. At the beginning it was working with ideal NPN transistors, but when I specified the model it didn't work.

Obviously there's a wiring error. If you have a working simulation, you should be able to use that to troubleshoot your wiring.
I thought so, but everything is the same, I just changed the model. Also, in proto it doesn't work as expected.

What I observed from your design is that the all of the MS flip flops have more gates than necessary. Will you have credit taken away for that?
No, I won't have credit taken. They just want a working-in-real-life prototype of the shift register. Thank you.
 

dl324

Joined Mar 30, 2015
16,839
Yes, it is. At the beginning it was working with ideal NPN transistors, but when I specified the model it didn't work.
Disagree. You have a wiring problem after the first MS flip flop. The second flip flop won't toggle.

Also, in proto it doesn't work as expected.
Have you checked a single NAND for correct operation?

The base current is going to be marginal for 2N2222. It should be okay for BC547. Fanout doesn't appear to be a problem. You can check for saturation and fanout problems on your breadboard.
 

Thread Starter

GAC19

Joined Mar 8, 2020
16
Disagree. You have a wiring problem after the first MS flip flop. The second flip flop won't toggle.
Okay, I will double check. Is there any possibility that the way of how the LED is connected in the output of the MS flip flop is what is affecting? Or maybe the relay that is in the input?

Have you checked a single NAND for correct operation?
I have, but I will make sure in every single NAND.

The base current is going to be marginal for 2N2222. It should be okay for BC547. Fanout doesn't appear to be a problem. You can check for saturation and fanout problems on your breadboard.
I will try those and will check. Thank you, again.
 

dl324

Joined Mar 30, 2015
16,839
Is there any possibility that the way of how the LED is connected in the output of the MS flip flop is what is affecting? Or maybe the relay that is in the input?
Is that a 500 ohm current limit resistor for the LEDs? I can't read the value... 20mA is way to much load on the outputs. If you want to run that much current, you need to buffer the output of the gate.

That's one of my gripes with simulators. They don't catch some dumb mistakes and make you think things will work when they won't.
 
Last edited:
Top