ThermalRunaway
New Member
mayankguru,
Your suggestion of using an SR latch is a sound one, however I am a little confused as to where you suggest to put it. My suggestion is to use the latch in between the output of your multiplexer and the input to the NAND gate which stops the counter from counting. Then, when a key is pressed the output from the multiplexer goes low, causing the SR to latch low. This causes the counter to permanently stop counting, and all you need to do then is decode the data on the multiplexer's inputs which correspond to which key was pressed. I've changed the setup of your demultiplexer and connected it as a decoder instead, so that it will suit this purpose.
When I simulated it in multisim I found that sometimes the decoder would give an erronous output - in other words the output of the decoder did not correspond to the key that was pressed. I think that's just a bug in the simulation, it probably wouldn't happen in real life. The error only occured every now and then - all other times the output of the decoder corresponded perfectly to which key was pressed, and I checked this for all of the keys.
What do you think?
Brian
Your suggestion of using an SR latch is a sound one, however I am a little confused as to where you suggest to put it. My suggestion is to use the latch in between the output of your multiplexer and the input to the NAND gate which stops the counter from counting. Then, when a key is pressed the output from the multiplexer goes low, causing the SR to latch low. This causes the counter to permanently stop counting, and all you need to do then is decode the data on the multiplexer's inputs which correspond to which key was pressed. I've changed the setup of your demultiplexer and connected it as a decoder instead, so that it will suit this purpose.
When I simulated it in multisim I found that sometimes the decoder would give an erronous output - in other words the output of the decoder did not correspond to the key that was pressed. I think that's just a bug in the simulation, it probably wouldn't happen in real life. The error only occured every now and then - all other times the output of the decoder corresponded perfectly to which key was pressed, and I checked this for all of the keys.
What do you think?
Brian