I want to implement 3 bit up counter that count 0 to 7 generally I made present state table and then next stable look at my post now I want to make table for counter so confused a lot what is input and output for counter
i think i need k map to minimize the term another question can i do it with finite state machine
From what I understand your trying to build a 3-bit counter, correct?
why, you can just buy them? In which case I'm guessing this is a school assignment?
Yes of course you can do it with a finite state machine, or a PIC or discreet logic gates or in JAVA. I even think there will be away to do this just using diodes...
So the question is what are you trying to do? Are you trying to build a counter or just understand how one works.
hi vead,
I have run a 3 stage binary counter and annotated the waveforms, you should now be able to visualize how it works.
The F/F's change state on the rising edge of the clock inputs
E
Ericgibbs posted while I was writing this, but this just goes to show that you can do this lots of different ways.
I've built my counter out of 1-bit half adders, see attached file. Research '1-bit half adder' on google there is plenty of info.
Now I want YOU to explain to US why these circuits work, you need to put in the hard work yourself to show willing in this subject or I for one won't be offering help in the future.
From what I understand your trying to build a 3-bit counter, correct?
why, you can just buy them? In which case I'm guessing this is a school assignment?
Yes of course you can do it with a finite state machine, or a PIC or discreet logic gates or in JAVA. I even think there will be away to do this just using diodes...
So the question is what are you trying to do? Are you trying to build a counter or just understand how one works.
yes you are guessing correct actually I need verilog code for counter so I started to understand basic concept of counter . in verilog we need to define what is input and what is output port but here I am having trouble because there are bunch of inputs and output I couldn't figure out how to define input and output thats why I made post for up counter I am just understanding for verilog code
So you want one input which is your clock. You could use a reset as well but the table for showed at the start doesn't have reset.
You also want an output 'count'.
on clock rising edge you want to add one to your count unless count is at its maximum value.
so something like:
Input clock;
output count;
always @ (posedge clock)
if (count == 3'b111)
count <=3'b000;
else
count <= count + 1'b1;
end
alternatively you can represent my circuit with logic functions
on rising edge;
B0=clk^B0
B1=(clk|B0)^B1
B2=(clk|B0|B1)^B2
You should be able to arrive at my above logic function from study of the logic table or clearly by looking at and understanding my circuit logic adder