Mar 7, 2006 #1 N nisheethg Newbie level 1 Joined Mar 7, 2006 Messages 1 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,289 hello i am preparing for interviews and have come across a question which is Divide by 3 counter with 75 % duty cycle For 75 % duty cycle i need to count 1/4th of a cycle...how do i do it?? Any clues...
hello i am preparing for interviews and have come across a question which is Divide by 3 counter with 75 % duty cycle For 75 % duty cycle i need to count 1/4th of a cycle...how do i do it?? Any clues...
Mar 8, 2006 #2 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 its very simple just build divide by 3 counter and invert any one of its output to get 75% duty cycle! Here is one more way! example in verilog! Code: module div3_75 ( // Outputs clk_out, // Inputs clk, reset_n ); input clk, reset_n; output clk_out; reg [1:0] count; assign clk_out = count[1]; always @(posedge clk or negedge reset_n) begin if (!reset_n) count <= 0; else count <= { ~count[0], ~count[0] & count[1]}; end endmodule
its very simple just build divide by 3 counter and invert any one of its output to get 75% duty cycle! Here is one more way! example in verilog! Code: module div3_75 ( // Outputs clk_out, // Inputs clk, reset_n ); input clk, reset_n; output clk_out; reg [1:0] count; assign clk_out = count[1]; always @(posedge clk or negedge reset_n) begin if (!reset_n) count <= 0; else count <= { ~count[0], ~count[0] & count[1]}; end endmodule
Nov 8, 2006 #3 V vcnvcc Full Member level 2 Joined Jul 21, 2006 Messages 132 Helped 3 Reputation 6 Reaction score 2 Trophy points 1,298 Activity points 2,210 Hi nand_gate this is not 75% duty cycle. it is 66% duty cycle, as output is high for 2 clok cycles and low for 1 clock cycles.. how to do 75%, could u tell me plz.
Hi nand_gate this is not 75% duty cycle. it is 66% duty cycle, as output is high for 2 clok cycles and low for 1 clock cycles.. how to do 75%, could u tell me plz.
Nov 8, 2006 #4 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 OK! What you need is 2x clock multiplier. Code: +------+ +----------+ | | +----+ | +----+ | | div | clk in | | +-| q|---(----|> by |----+ ----+----| 2x |----0> | | | 3 | | | | | | qn|---+ | | | ___ | +----+ +----+ +------+ +--\ \ | ) )--- div by 3 | +------+ +--/__/ 75% duty cycle | | | | | | div | | +----------------------------|> by |----+ | 3 | | | +------+
OK! What you need is 2x clock multiplier. Code: +------+ +----------+ | | +----+ | +----+ | | div | clk in | | +-| q|---(----|> by |----+ ----+----| 2x |----0> | | | 3 | | | | | | qn|---+ | | | ___ | +----+ +----+ +------+ +--\ \ | ) )--- div by 3 | +------+ +--/__/ 75% duty cycle | | | | | | div | | +----------------------------|> by |----+ | 3 | | | +------+
Oct 23, 2009 #5 A arvkum02 Newbie level 3 Joined Mar 14, 2008 Messages 4 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,283 Activity points 1,304 first make a divide by 3 with 50% DC . Then delay this o/p by 25% . OR the two signals you will get the desired o/p.
first make a divide by 3 with 50% DC . Then delay this o/p by 25% . OR the two signals you will get the desired o/p.