decoder or encoder?
Tbag
Posts: 31
Forum members,·I am trying to get around using a microcontroller. Not because I don't like them (I have the BS2) but becuase inutitively I don't feel its necessary in this case. Since researching after·talking with a lot of you, and you were all very knowledgable, I feel I need to revisit.
I am driving a counter with a clock, and I want the clock's binary output to·a decoder to drive a gate. Problem is I need it to stay·in the "Hi" state (or lo) while the counter is on a particular number.·From what I have researched since my last post, the decoder output (as well as the counter) will·be a square wave oscillation of·Hi to Lo at a frequency less than the clock (f/2 to the n to be exact). I need an output that will stay Hi OR lo. The logic being that ultimately it will ultimately connect to a subcircuit that needs a steady state.
Could Mr.Lee Harker be correct in that we need to connect the counter to an ENCODER and not a decoder?
-Tbag
I am driving a counter with a clock, and I want the clock's binary output to·a decoder to drive a gate. Problem is I need it to stay·in the "Hi" state (or lo) while the counter is on a particular number.·From what I have researched since my last post, the decoder output (as well as the counter) will·be a square wave oscillation of·Hi to Lo at a frequency less than the clock (f/2 to the n to be exact). I need an output that will stay Hi OR lo. The logic being that ultimately it will ultimately connect to a subcircuit that needs a steady state.
Could Mr.Lee Harker be correct in that we need to connect the counter to an ENCODER and not a decoder?
-Tbag
Comments
The encoder does the reverse, outputing the binary of a input's position. Typically there is a priority for each line, in case more than one line is active at a time, frequently the name priority encoder is used.
<edit> I think I may have read your post wrong, let me study it a bit more. How many bits does your counter have? </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 8/23/2005 4:52:29 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 8/23/2005 5:06:19 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Still confused,
Mr.T
How many bits does your counter have, you understand that an encoder only has 3 inputs right? So if you have an 8 bit counter, you will need 32 decoders, plus additional circuitry to enable you to choose one arbitrary count value out of 256 possible count values, additionally if you choose to change the value you respond to you will need to physically disconnect it from the old line and connect it to the new line. The identity comparator circumvents all of this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
-T.
Is this becoming clearer for you?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 8/25/2005 11:08:20 PM GMT
If we have a 10 digit binary counter connected to say a 1.2 Mhz clock source and we want an output frequency of 150 khz we would connect our circuit to the 3rd pin in the count. Therefor the resultant frequency is f/2^n or 1.2Mhz/2^5 = 150 khz.
The stimulus for this topic was driven by a need for a logic scenario to enable 3 seperate AND gate drivers sequentially at equal intervals and reset after the third to start again. Problem is that I beleive (underscore beleive) that attaching this to the first three outputs of a decoder with count four tied to reset would work BUT would render an asynchronous circuit becaise of the propagation time through the decoder which is not directly controlled by the counter clock. Therefor the answer is to create a shift register of D flip-flops and using a NOR gate tied in parallel to each D output to set the first bit to 1. You would connect in parralel the output of each D flip flop also to the enable of the AND gates and you get a sequential gate driver described above that is synchronous with the system clock.
I don't think there are any huge errors here but this has been a great debate over various design approaches to what was a seemingly simple problem. The prior thread from which this was started is a few threads down the forum under title "Is a stamp necessary in this case".
-T
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 8/30/2005 5:14:23 PM GMT
The 74(HC)175 is a quad D f/f that would work great.· As you mentioned, you would simply connect the output of one f/f to the input of the next one.
The proper sequence will be created by connecting a 2 input NOR gate to the first and second outputs, and the output of the NOR gate to the first D input.
One possible problem with this approach is that it·only cycles correctly after the first clock; when you power up the circuit ALL 3 outputs are low.· However, if you use a dual f/f chip with both reset and set pins, you can initialize the circuit to "100" and be OK...
Have fun...
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10