Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

counter circuit connected to comparator circuit

Hi all, I need serious help here. I have to build two types of circuits as shown in the attached. The second one shows the circuit when the comparator's output is returned to the CLP. The IC's used here are IC 85 and IC 393 and the prototyping board used here is NI ELVIS 2. I think I have connected the pins right but the waveforms I got look so weird! I am required to get the results as in the 3rd for the first circuit. In the second one, I am supposed to show that the counters are cleared. Please tell me what to do to correct this. Please do check my circuit. I have looked hard and I don't see anything missing.

55.JPGcomparator and counter (counter cleared).JPGrei.JPG1.jpg2.jpg

Here are my results, I only did for N=6, though.
circuit 1:


a>b

1.JPG

 

 

a=b

2.JPG

 

 

a<b

3.JPG

 

 

circuit 2:

 

a>b 

2 (circuit 2).JPG

 

a=b

3 (circuit 2).JPG

 

 

 

a<b 

1 (circuit 2).JPG

 

0 Kudos
Message 1 of 8
(9,233 Views)

Hi Aruwin,

 

It very difficult to follow your wiring and there is no way for me to test you connections. If you circuit is not working, you have use the instruments available on the ELVIS unit to test you circuit that's what it for, use the scope the digital input channel to probe your connection make sure the inputs and output are doing what they should.

 

Since you are having a lot of trouble, I suggest you break the circuit down and build it in stages. The first stage is your counter and since I don’t have a 393 IC available, I will build the circuit in Multisim ELVISmx schematic.  Set the ELVISmx function generator frequency to something like 10 Hz so that you can see the LED changing state on the ELVIS board. Look at the attached screen shot to see the wiring and settings on function generator.  The schematic doesn't show VCC and GND but make sure you connect power on ground pin correct on the prototype board.

 

Once you got the counter to work, wiring the next stage.  Your diagram shows connection to D1-D3 to the IC 85, these references inputs used to compare to the counter stage with your preset binary number.  You need to use the ELVISmx Digital Writer VI (Digout on the ELVINS launcher), set the D0 to D3 to the binary number whatever you need.  Remove the wire on the 939 clear bin then connect the clear pin to the A<B pin I suggest you also connect to one of the LED pin on the ELVIS board.

 

To tell if your circuit is working correct, press the Run button on both the digital writer and function generator ELVISmx instrument, your counter LEDs should be counting and when clear LED turns on, the counter LED will turn off. 

 

Good luck.

 

Tien P.

National Instruments
0 Kudos
Message 2 of 8
(9,211 Views)

It's not difficult to check my circuit, really. If you have looked at my circuit, you'll see that I have grounded and connected the power supplies. However , I am not sure if I have connected the bypass condenser the correct way. Could you PLEASE look at my breadboard? Please. The picture is big enough for you to see each wiring.

And, could you give me the results of that simulation you posted? Did it work on your simulation? I want to see the waves that you got. 

 

0 Kudos
Message 3 of 8
(9,197 Views)

It looks like you probably have the bypass capacitor connected to the correct circuit nodes. However the long wires prevent the bypass capacitor from actually bypassing much.  On a breadboard like that it is nearly impossible to do good high frequency bypassing.

 

Lynn

0 Kudos
Message 4 of 8
(9,188 Views)

But I am given the task to use this breadboard and my other friends have got the results as expected, though. Can I download the NI ELVIS simulation software on my pc? 

 

I also have to clarify that I have tested the chip separately, and run a counter test and comparator test and it worked fine. But when I connected the two, I didn't get the result I was hoping for. I don't really understand the results though. Whenever I change the binary number with digital writer, the LED lights up in a specific pattern. Can you explain to me what the LEDs represent?

0 Kudos
Message 5 of 8
(9,186 Views)

I have never seen an ELVIS unit so I cannot comment on the LEDs or on the software.

 

Have you tried to generate a timing diagram as I asked earlier? The A>B pulse (if you ever get one) lasts about 37 ns, so you will almost never capture it on the ELVIS scope. The A<B output will be high for counts 0 through 5 EXCEPT that that line is holding the 393 in Reset mode so it will never count! The 393 Clear or Master Reset is active high.

 

Lynn

0 Kudos
Message 6 of 8
(9,179 Views)

I didn't make a timing diagram. 

But could you expplain what this LED means?

I set the binary to be 2^1 + 2^2 = 6

 

led.jpg

0 Kudos
Message 7 of 8
(9,172 Views)

I told you I have never seen an ELVIS board so I have no idea what the LEDs indicate.

 

It seems you are trying to learn about phase locked loops and logic circuits. Let me make a suggestion. I am an electrical engineer with over 40 years experience at designing circuits and have taught circuits classes at a major engineering university. The last thing you do when designing a circuit is to build and test a breadboard. The next to last thing you do is simulate the circuit. Before doing either of those things you check the logic of the design with pencil an paper.

 

Draw a timing diagram similar to those you posted in the first message in this thread. List the signals down the left edge of the paper. Clock, Clear (or Master Reset), Qa, Qb, Qc, Qd, A0, A1, A2, A3, A>B, A=B, and A<B.  Start with all the Qs = 0 as though a Clear had just occurred. Set the As for 6 as you were using that as an example.  Draw a series of clock pulses. Before the first clock falling edge, determine from the HC85 datasheet what the outputs will for the inputs which exist at that instant. Draw those on the diagram. Then determine what happens at the first clock edge. Then the next edge and so on. DO NOT ASSUME that the circut will work as the timing diagrams you posted show. It does not.

 

Once you see what it is doing, and that it is not doing what you expected, then you try to figure out how to make it work the way you want.  The problem is not bypassing.

 

It took me less time to look up the datasheets and do a timing diagram than it took to write up this description. You have less experience so it may take you a bit longer but it will be much less time than you have already spent trying things which did not work.

 

Lynn

0 Kudos
Message 8 of 8
(9,169 Views)