cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
001fd09138e7
Visitor
Visitor
4,283 Views
Registered: ‎12-14-2015

Two Asynchronous inputs problem

Jump to solution

Hello, can anyone explain to me why the attached vhdl codes do not work on a Basys2 board?. The circuits that describe those codes it can see in the attached pdf.

 

 

Can anyone tell me the proper way to describe the behavior of the indicated circuits?

 

Thank you

 

0 Kudos
1 Solution

Accepted Solutions
austin
Scholar
Scholar
8,238 Views
Registered: ‎02-27-2008

0,

 

Did you simulate it?  Did it count properly?

 

On the bench, did it count multiple times when toggled?

 

If the preceding are both true, then yes, the de-bounce is insufficient for the switches.

 

if it is not counting in the simulation, then the code is incorrect.

 

Again, the steps to follow:  code, simulate, correct until simulation does what you intended, bench test, revise, repeat until correct.

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
5 Replies
austin
Scholar
Scholar
4,277 Views
Registered: ‎02-27-2008

0,

 

Where do you de-bounce your switches?

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
001fd09138e7
Visitor
Visitor
4,246 Views
Registered: ‎12-14-2015

Hi, the Basys2 has RC low pass filters and schmitt trigger buffers for the buttons. May it not be enough?. Is correct the code?

 

thank you

 

Carlos Castro

0 Kudos
001fd09138e7
Visitor
Visitor
4,238 Views
Registered: ‎12-14-2015

Hi, the Basys2 has RC low pass filters and schmitt trigger buffers for the buttons (see pdf attached). May it not be enough?. In your opinion, the code is correct?

 

thank you

 

Carlos Castro

0 Kudos
austin
Scholar
Scholar
8,239 Views
Registered: ‎02-27-2008

0,

 

Did you simulate it?  Did it count properly?

 

On the bench, did it count multiple times when toggled?

 

If the preceding are both true, then yes, the de-bounce is insufficient for the switches.

 

if it is not counting in the simulation, then the code is incorrect.

 

Again, the steps to follow:  code, simulate, correct until simulation does what you intended, bench test, revise, repeat until correct.

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
001fd09138e7
Visitor
Visitor
4,228 Views
Registered: ‎12-14-2015

Hi, I have not simulated the code. I've tested the code in a Basys2 board. At the time of writing the code I have had many problems to describe the circuitry so the synthesizer do noy give me errors. So, I thought my problem was a incorrect code.

 

The operation in the Basys2 show erratic errors. I simulated the circuits with a simulation program (Multisim) and they work properly, so I think that the problem is not the circuits.

 

I guess you're right and that the problem is the switch debounce.

 

Thank you very much for your comments

 

a greeting

 

Carlos Castro

0 Kudos