There was an assignment as follows: implement a counter which gets as an input of 8 pulses, 5 volts each, with frequency of 40K Hz, without using counter block, or any IC components. In the output there are 8 diodes, with each pulse another diode should be activated, such that with the first pulse - the first diode get's activated, with the second pulse, the second diode get's activated, and so on.
my idea of implementation was to use FF's to act as a shift register - on the first pulse, the first FF passes the 5 volt and lights up the first diode, on the second pulse, the second FF get's activated and lights up the second diode, and so on.
I tried to implement a FF of my own, using logic gates, but for some reason, it doesn't work. When I tried using the FF component which multisim offers, I linked the FF's in a row, but the second FF get's contaminated too soon, before the second pulse arrives - thus activating the diode before the time. perhaps anyone could give me some advice on what am i doing wrong:
what's the problem with the way I connected the FF's in the first picture?
why does the logic gate implementation of my FF doesn't work?
Full design:
the simulation result of the blue point X marked in picture (1) - the AND gate output:
mulation result of the FF's as depicted in picture (1):
NOTE: the second pulse arrives after 2.5x(10^-5) sec, but the second FF (depicted in green in the 3rd picture) gets contaminated and activates the diode after 2x(10^-9) sec
and last, my FF implementation using logic gates which refuses to work and outputs zero all the time:
Thank you very much for you time and attention!