how to get an output off a debouncer.

A

Amit

Guest
Hi group,

I need to code a debouncer which is done however, I have to connect
its output to a johnson counter. I'm thinking of implementing the
johnson counter as a PROCESS. (hope I'm on a right track).

Now, can I define the counter as following?

jcounter: PROCESS(Debounced_Switch)
BEGIN
....
END PROCESS;

Your comment is appreciated.

Regards.
 
Amit wrote:

I need to code a debouncer which is done however, I have to connect
its output to a johnson counter. I'm thinking of implementing the
johnson counter as a PROCESS. (hope I'm on a right track).
I would use a single synchronous process for this design.

architecture synth of my_design is
begin
main : process(reset, clock) is
-- declarations
begin -- process template
if reset = '1' then
init_regs; -- clear debouncer and counter regs
elsif rising_edge(clock) then
update_regs; -- update debouncer and counter regs
end if;
update_ports; -- wire output regs to ports
end process main;
end architecture synth;

See
http://home.comcast.net/~mike_treseler/
for related examples.

-- Mike Treseler
 
On Oct 5, 8:33 am, Mike Treseler <mike_trese...@comcast.net> wrote:
Amit wrote:
I need to code a debouncer which is done however, I have to connect
its output to a johnson counter. I'm thinking of implementing the
johnson counter as a PROCESS. (hope I'm on a right track).

I would use a single synchronous process for this design.

architecture synth of my_design is
begin
main : process(reset, clock) is
-- declarations
begin -- process template
if reset = '1' then
init_regs; -- clear debouncer and counter regs
elsif rising_edge(clock) then
update_regs; -- update debouncer and counter regs
end if;
update_ports; -- wire output regs to ports
end process main;
end architecture synth;

See
http://home.comcast.net/~mike_treseler/
for related examples.

-- Mike Treseler


Hi Mike,

Thanks for your link and sample. I assume the code you posted is for
debouncer handling. Right? I'm a little confused. Let's say I have it
as:

entity mydebouncer is

--here goes inputs/outputs

end mydebouincer;

architecture of beh of mydebouincer
begin

--process for debouncer
main: process
begin

end process;
end beh;


Now are you saying I must place a code for johnson counter in this
process? would you please give me some hints?

Thanks,
ak
 
Amit wrote:

Thanks for your link and sample. I assume the code you posted is for
debouncer handling. Right?
I posted a template, not the the full code.
I said I would combine the two processes,
but you don't have to.

You could use two synchronous processes and
wire them together with signals.

Post your counter code.

-- Mike Treseler
 
On Oct 5, 12:41 pm, Mike Treseler <mike_trese...@comcast.net> wrote:
Amit wrote:
Thanks for your link and sample. I assume the code you posted is for
debouncer handling. Right?

I posted a template, not the the full code.
I said I would combine the two processes,
but you don't have to.

You could use two synchronous processes and
wire them together with signals.

Post your counter code.

-- Mike Treseler


Hi,

Thanks again for your response. I think I didn't explain it well. My
problem is that I don't know how to connect them together (debouncer
and counter).

I have coded (both)and I will post the code as soon as I get at my
desk. However, I don't know how to direct debouncer's output
to the counter. Currently I have two different projects. I don't want
this.

I need to learn how to use them in a signle file using PROCESS. Just
tell me how I can connect the output of debouncer to counter.

thanks.
ak
 

Welcome to EDABoard.com

Sponsor

Back
Top