# digital design project

Discussion in 'Homework Help' started by cupcake, Oct 7, 2010.

1. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
could anyone pleas enlighten me, how to implement/design this project?? I use three register to store the three trials, but I don't know how to use counter to count the trials

2. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
That looks fairly complex, but not undoable. Do you need to design it only or build it too? What have you done so far? Please post a schematic of a logic diagram that will depict how you imagine your circuit to work.

3. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
I have to design and build it as well.. so far, i haven't come up with any schematic diagrams.. *that's why I asked it on the forum*

a bit confused what component to use, so far I figured, that I'm gonna use three shift register to store the memory of the three trials, and then use some combinational circuit to calculate the scores whether it will pas/fail. but, I have no idea how its gonna work with the counter part. could you give me some ideas?

4. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
Btw, for this part
for combinational circuit, I use AND and OR gate,
such that Z = 11 or (10 and 10) or (01 and 01 and 01)
is this right?

5. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
You must understand the circuit you are talking about is fairly complex. No member of this forum is willing to design the whole project for you. What we can do is ask targeted questions to show you the way or help you with difficult parts of the project.

What you must have in you mind, before asking for help, is to know exactly what you want your circuit to do. You said you want it to be an evaluation machine, but you fail to describe it thouroughly. You said the score will be input by switches but you didn't say if the 3 scores will be given simultaneously, as a sum, or one after another.
From the context I understand that you want to input the 3 scores separately but at the same time, which contradicts the other prerequisite, the fact that at a score of 3, the qualification is automatic regardless of the next 2 scores.

Good answers come from good questions. So please post at least a logic diagram of your circuit. I don't ask for gates and IC's. Just Logic Units or Modules that will do a specific, even theoretical job, and the way they are interconnected. This will be your "plan" or "map" in the course of building the circuit.

Then we will talk about if your plan is feasible or not. If we agree that it can be done, we will talk about how exactly, with which materials the project wil be made.

6. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
Hi, sorry if I'm not clear enough about my questions... I know exactly what my circuit want to do, but I just bit confused about what IC to use, and how the IC exactly works.
I'm sorry this prerequisite came after I post the problem, so it meant, it requires me to check the input first before counting up right? so if a score is 3, then it will automatically declare PASS, if not I should input another value, until it satisfy the requirement.

Now, I still have the blackbox of my circuit, I haven't come up with the schematic diagram.. so, I divided into say 4 system, system 1 basically counts three trials input from push button, system 2 is memory system to store the input value (from 2 dip switch), system 3 is scoring system to evaluate the logic condition and requirement, and system 4, counts 3 clock cycle..then give output..

here I attach the picture. sorry if the picture isn't clear. (the dashed line meant, after satisfy all the condition, it will reset all the
systems)

7. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
Here are my thoughts:

First you will set your switches as you wish and have them ready to be transfered to the rest of the circuitry. The score could be fed onto a binary adder through a latch that will re-feed the result to itself. When the result becomes 3 or above, the condition is met.

You must, however, make sure the data from the switches goes to the adder for only 1 cycle when you press the "enter" button. The rest of the time, the adder must be fed zeroes. You can arrange that by constructing a small FSM with 3 states that will drive the Control pin of a latch ON for only 1 cycle.

In the meantime you will count the hits of the "enter" button with a counter or an FSM and when the third is recorded you will activate, with a function that detects the 3rd hit, the display module and another counter (or FSM) that will count 3 clock cycles. At the end of the count this module will hit the "master reset" and the procedure will restart.

8. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
sorry, sir.. what's FSM? I'm sorry I'm still new in this kind of things

so, basically..
2-dip switch -> register (tie in with press button) -> when we press the button -> register -> register (3 register for three trials) -> adder -> when condition met, then declared -> evaluate the core -> counts three clock cycles.

I'm still not sure about the adder part, should the inputs go to each register and then go to the adder, then evaluate?

Last edited: Oct 9, 2010

Dec 5, 2009
5,201
313
10. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
I haven't been taught about that.. even my lecturer hasn't covered register and counter yet, that's why I'm a bit lost.. Thanks a lot for the help.. I will think about it again..

Dec 5, 2009
5,201
313
12. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
It seems that you are struggling with this one. Maybe you are not yet prepared for that kind of challenge. I would suggest you drop it for now, as pursuing something very difficlut will drain all the pleasure from it. If quitting is not an option though, I will try to take this build step by step.

So, step 1. Can you make a clock for your circuit ticking at your desired frequency?
Can you make a Finite-State-Machine with 3 states that will do the following: Start at state A, go to state B with a 1 and go to state 3 with another 1. It will return to state A from any other state with a 0. Read my link on my post (#2) in this thread for more info: http://forum.allaboutcircuits.com/showthread.php?t=43933

13. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
I couldn't quit..I'll try to do this project no matter what..
I got the clock already, I use 555 timer, and got my desire clock, 5 Hz
I already come up with my scoring system and memory system to store three inputs.. but. still confused about the counter and adder...

14. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
Did you read the .pdf I suggested? Did you understand what you read? Do you have any questions?

Post the circuits you have already built for evaluation.

A good read on FSM costruction with Flip Flops and Digital Electronics in general is the Digital Design by M. Mano.

Note: In the system I have in mind you don't have to store the 3 scores separately.

15. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
ok, I got the pdf.. will read through it

that's the simplest ways I could come up with, but not so effective since I will use so many chips..*maybe*

so, I will do it step by step.. here is my though 2-dip switch input to one register, and the select pins of the register tie in with the push button.. once I input a value say, 01..(first trial) the output of the register will still be 00 unless I press the push button.. then, check the value if it is 3..declared pass.. otherwise, go to second trial, I input the value say, 01..still not met the condition, continue untill the third trial..

so basically, in my mind the register works like this
input 01 -> output is 00 unless I press push button -> after pressing the push button -> output 00 in one register-> second trial etc etch..

How do you store the trials without using three register?

hope, I explain my point clearly

16. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
I don't know why..but I could not open the pdf file.. the internet doesnt go through

Last edited: Oct 10, 2010
17. ### cupcake Thread Starter Member

Sep 20, 2010
73
0

this is what i meant about my scoring system...still raw.. the push button s3, should connect to D FF first..before connecting it the select pin of the registers

18. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
I can still open the pdf fine, try again or with another browser/computer.

Your design for the registers is fine, we 'll work with that. Now can you make a logic function that will return a 1 if one of the possible combinations appears?
The combinations you want are 3XX, 23X, 22X, 211, 212, 111, 13X, 121, 111, 113, 112. I think I got them all. X are the indifferent terms. Now this can be a little tricky, as there are many (6) input variables. If you can do it, or have a software to do it for you, that's fine.

But another more human-friendly solution is to actually count the different results with separate functions. I explain: F1 will count the 1's that come into the registers. If Q3 (the LSB) of every register is 1, the you have at least 3 aces and you are good to go. Same for the 3 Q2's that will tell you if a 2 is in the register. To read the 3 you need to take data from both Q3 and Q2.

To conclude, 1 function to tell if you got 1 in all 3 Least Significant Bytes.
1 function to tell if you got at least 2 2's.
1 funtion to tell if you got a 3 in any position.

Try to post as much as you can handle and come back for advice.

19. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
hmm..I got it.. *a bit*
so basically, what you are saying is, say the output from register one should go to F1, check if it's 3 then immediately declared PASS, if not, then F2 will check for two 2's from the output of register 2, and F3 check from the output of register 3.. all of the output from the F1,F2 or F3 will then be go to counter.. (not sure about this..)

so, now I'm trying to build the F1,F2,F3.. what chips should I use? adder? or just use AND and OR will do?

20. ### cupcake Thread Starter Member

Sep 20, 2010
73
0
ok, after I read it again..seems I'm wrong to interpreting what you meant about function 1,2,3 I will try to understand it again, slowly and carefully...