Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[MOVED] Even binary counter from binary counter...................

Status
Not open for further replies.

sunidrak

Full Member level 1
Joined
Apr 12, 2012
Messages
97
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Bengaluru, India
Activity points
1,738
hi ,
can anybody tell how to design or modify a binary counter(0,1,2,3,...) as a even counter counting (0,2,4,6....) ??

regards
Sunil
 

Re: Even binary counter from binary counter...................

Hi Sunil,
At what level do you design?
In general, append an additional bit with 0 value to the output of the binary counter.
For example, if you had 10-bit binary counter, you'll have 11-bit counter. LSB bit will be tied to 0.
assign cnt_out = {counter, 1'b0};

Regards,
Vardan
 

Re: Even binary counter from binary counter...................

hi vardan Sir,

I have a 4 bit binary counter , i want to modify it as a "even counter", means it should count only 0..2...4...6...8.....14..
 

Re: Even binary counter from binary counter...................

you can just multiply normal binary number with 2'b10
 

Re: Even binary counter from binary counter...................

Is this related to CPLD/FPGA or hips of the 4000 or 7400 series ?
 

Re: Even binary counter from binary counter...................

This is binary counter output sequence:
0000, 0001, 0010, 0011, 0100,...
0 , 1 , 2 , 3 , 4 ,...

Just add a bit after LSB of the counter above, and tie it to 0.
00000, 00010, 00100, 00110, 01000,...
0 , 2 , 4 , 6 , 8 ,...
 

Re: Even binary counter from binary counter...................

initialize out= 4'b0000
and then increment it by 2 as out =out +2'b10

or
increment the out number by 1'b0 and then left shift the result by 1'b1
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top