Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

My counter's going backwards?

Hey,

I have been trying to create a 3-bit binary counter for a project and nothing seems to be going right. In fact it needs to be a divide by 6 counter, but I'll worry about that later.

At the moment I have the design, but it likes to count backwards instead of forwards. I'm sure it will be quite simple, but I can't for the life of me figure out what's wrong.

Thanks for any help you can give, I have attached the circuit below.

Andy
0 Kudos
Message 1 of 7
(5,005 Views)

Try taking the clock pulses for the last to flip flops from "not Q" output of the previous ones. Apparently, what is happening is that these are being triggered on a rising clock pulse edge. The way you have them now, the first one will come up high trigger the second one and then the second one triggers the third one at power up. This allows all the leds to come on and when the next clock pulse comes around the first one will turn off while the others remain on. The next pulse switches the first on back on resulting in a high at Q which in turn turns number two off. This goes on this way throughout the count and is in essence counting down. I must say that this a very cool circuit they way it is working now and to come up with it by accident is truly amazing.

I hope this helps you get it the way you need it. You might want to save this ciruit as it is now because you may need a down counter at some point in the future and since you already have it you wouldn't need to "re-invent the wheel" again.

Very nice job on this circuit (even if it wasn't what you were shooting for)

 

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 2 of 7
(5,003 Views)
Thanks a lot. That worked perfectly. And I will save the circuit. I'm doing a Computer Science course so the bigger library of circuits I can get the better.
0 Kudos
Message 3 of 7
(5,000 Views)
I think maybe it actually has something to do with the type of flip flop I chose to use. The ones in the circuit above were from the TIL library. When I try to use ones from the TTL library (I need the CLR function for a divide by 6 counter, as connecting anything to reset on the others stops the circuit from functioning) then the lights just stay on permanently. Not fluctuating at all.

Any ideas on this one?

Andy


Message Edited by andibomb on 03-07-2008 05:26 PM

Message Edited by andibomb on 03-07-2008 05:26 PM
0 Kudos
Message 4 of 7
(4,996 Views)

I have got the circuit counting by taking all the open pins and tying them back to VCC and placing a DGND on the schematic. I am still looking into the reset issue. So far I have not found a way of doing this yet. Like you said, every time I try to clear the three stages all the LEDs will freeze on and the circuit locks up and will do nothing from that point. I  will continue trying various ideas and will get back with you when I find a solution. This may take a while so your patience will be greatly appreciated.

 

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 5 of 7
(4,976 Views)

Alrighty, I got it. I am going to post the schematic for you to examine. What I did was to look at the component information in the component properties dialog box. After examining the truth table for the IC I found that in order to reset them that CLR had to be low and PRE had to be high. In the original circuit when I tied all these to high all three LEDs came on indicating that all the Q outputs were coming up defaulted high. My thought process that if I leave PRE High and take the Q ouputs and invert them and feed that back to CLR then a reset could be accomplished. Since all three of them were high this indicated that binary 7 was being displayed. How to reset this after 6? I tried tying in a nand gate to the outputs of the last 2 thinking that it would display 6 and then reset. That was wrong. It counted to 5 and then reset on 6. This clued me in on what needed to be done. If it was reseting on the number you selected then in order to display the number you selected then you need to reset after that number which in this case would be 7. I then tied a 3 input nand gate to all outputs and now it will count to six and reset them on 7. This will allso automatically reset them to zero on power up.

I hope this helps. Here is the completed circuit:



Message Edited by lacy on 03-08-2008 03:30 PM
Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 6 of 7
(4,971 Views)
Ah yes, that makes sense actually. You see I'm used to using a Logic Tutor when doing actual circuits like this in our hardware labs, and on that all inputs on that float high, so obviously clear and preset aren't activated. I seem to recall the little circle on the input indicates a low input is required to set these functions, it just didn't occur to me when I was wiring it up in Multisim. So that explains why it wouldn't work with CLR and PRE not connected to anything, because they were constantly on as they weren't tied high, so they were either presetting or clearing the circuit. So either all LEDs were preset to on, or cleared continuously.

Thank you so much for your help, it really is appreciated. And it does help incredibly with the project I have been set.
0 Kudos
Message 7 of 7
(4,962 Views)