Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter error

I am finding a glitch in a synchronous counter with MultiSim 10.  This glitch happens with a 74LS193 chip or even a synchronous counter made out of flip flops and some gates.  I will post an example file that duplicates this error.
 
Basically what happens is as the counter is counting in this sequence: 1, 2, 3, 7,4 ..  when it is suppost to count 1,2,3,4..   The 7 is the glitch.  I do not believe this can be duplicated in a real circuit so I believe this is a simulation error.
 
I have a class project where I have to use a counter and it cannot have any glitches as it could produce erroneous results.
 
The counter_error file is suppost to work like this:
By toggling the switch there is a clock pulse going to the UP input which counts up on the outputs.  When the counter reaches 7, the NAND gate goes low and activates the loader, so that the hardwired A,B,C,D inputs are transferred to the Q outputs.  This is suppost to make the counter count in this sequence, 1,2,3,4,5,6,1... I understand that there will be a glitch of 7 after the 6.
 
So what happens is the counter counts up to 3 and then resets to 1.
 
I would appreciate any ideas on how to fix or patch this problem.
Thanks.
Alex K.
 
 
 
 
0 Kudos
Message 1 of 2
(4,923 Views)
Hi,
 
 
The problem with the circuit is that you are decoding outputs that change at slightly different times due to propagation delay. As the counter counts from 0011 to 0100, for a very short period of time it passes thru the state 0111 thus causing a glitch on the output, resulting in the counter being loading due to the asynchronous load input. You can see the problem on the included circuit where I have slightly modified your circuit. You will see the counter count to 0011 and the glitch on the output which loads the circuit with 0001.
 
To fix the problem you can change the type of IC used to one which uses a synchronous load or, if you must use this counter, change the 3 input NAND gate to a 4 input NAND gate and run the clock through an inverter to the 4th input.
 
I hope this helps.
 
Howard
0 Kudos
Message 2 of 2
(4,919 Views)