<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=The_Debounce_circuit</id>
	<title>The Debounce circuit - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=The_Debounce_circuit"/>
	<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=The_Debounce_circuit&amp;action=history"/>
	<updated>2026-05-28T08:17:42Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=The_Debounce_circuit&amp;diff=6034&amp;oldid=prev</id>
		<title>Cbira la 10 mai 2018 06:47</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=The_Debounce_circuit&amp;diff=6034&amp;oldid=prev"/>
		<updated>2018-05-10T06:47:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 10 mai 2018 06:47&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Linia 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In sequential circuits, any input variable that is not dependent of the system clock, is an asynchronuos input. The majority of these async inputs are coming from the mechanical devices like the 4 push-buttons on the devboard. Besides being async, these signals are not perfectly rectangular, because the mechanical elements inside the buttons need a small time to get stable. For this short time, the generated signal contains multiple spikes, what may prevent correct functioning of other conntected circuits (it is behaving as a high-frequency signal). We will solve this problem, by ignoring the problematic period of time (a few milliseconds). The Debounce circuit below, receives on the input, a signal similar to &amp;#039;&amp;#039;&amp;#039;in&amp;#039;&amp;#039;&amp;#039; from the below &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;figured&lt;/del&gt;, and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;generated &lt;/del&gt;a perfect rectangular output signal (&amp;#039;&amp;#039;&amp;#039;out&amp;#039;&amp;#039;&amp;#039; in the below picture).&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In sequential circuits, any input variable that is not dependent of the system clock, is an asynchronuos input. The majority of these async inputs are coming from the mechanical devices like the 4 push-buttons on the devboard. Besides being async, these signals are not perfectly rectangular, because the mechanical elements inside the buttons need a small time to get stable. For this short time, the generated signal contains multiple spikes, what may prevent correct functioning of other conntected circuits (it is behaving as a high-frequency signal). We will solve this problem, by ignoring the problematic period of time (a few milliseconds). The Debounce circuit below, receives on the input, a signal similar to &amp;#039;&amp;#039;&amp;#039;in&amp;#039;&amp;#039;&amp;#039; from the below &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;figure&lt;/ins&gt;, and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;generates &lt;/ins&gt;a perfect rectangular output signal (&amp;#039;&amp;#039;&amp;#039;out&amp;#039;&amp;#039;&amp;#039; in the below picture).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fișier:debounce1.png|Async input and debounced output]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fișier:debounce1.png|Async input and debounced output]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cbira</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=The_Debounce_circuit&amp;diff=6033&amp;oldid=prev</id>
		<title>Cbira: Pagină nouă: In sequential circuits, any input variable that is not dependent of the system clock, is an asynchronuos input. The majority of these async inputs are coming from the mechanical de...</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=The_Debounce_circuit&amp;diff=6033&amp;oldid=prev"/>
		<updated>2018-05-10T06:47:29Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: In sequential circuits, any input variable that is not dependent of the system clock, is an asynchronuos input. The majority of these async inputs are coming from the mechanical de...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In sequential circuits, any input variable that is not dependent of the system clock, is an asynchronuos input. The majority of these async inputs are coming from the mechanical devices like the 4 push-buttons on the devboard. Besides being async, these signals are not perfectly rectangular, because the mechanical elements inside the buttons need a small time to get stable. For this short time, the generated signal contains multiple spikes, what may prevent correct functioning of other conntected circuits (it is behaving as a high-frequency signal). We will solve this problem, by ignoring the problematic period of time (a few milliseconds). The Debounce circuit below, receives on the input, a signal similar to &amp;#039;&amp;#039;&amp;#039;in&amp;#039;&amp;#039;&amp;#039; from the below figured, and generated a perfect rectangular output signal (&amp;#039;&amp;#039;&amp;#039;out&amp;#039;&amp;#039;&amp;#039; in the below picture).&lt;br /&gt;
&lt;br /&gt;
[[Fișier:debounce1.png|Async input and debounced output]]&lt;br /&gt;
&lt;br /&gt;
== Implementation of a debounce circuit ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Verilog&amp;quot;&amp;gt;&lt;br /&gt;
module Debounce(&lt;br /&gt;
	output out,&lt;br /&gt;
	input clock,&lt;br /&gt;
	input in&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
parameter limit = 20&amp;#039;d650000;&lt;br /&gt;
&lt;br /&gt;
reg [19:0] counter;&lt;br /&gt;
reg hit;&lt;br /&gt;
&lt;br /&gt;
assign out = (counter == limit);&lt;br /&gt;
&lt;br /&gt;
always@(posedge clock) begin&lt;br /&gt;
        if(!in) begin&lt;br /&gt;
		counter &amp;lt;= 0;&lt;br /&gt;
		hit &amp;lt;= 0;        &lt;br /&gt;
        end else if(counter == limit) begin&lt;br /&gt;
		hit &amp;lt;= 1;&lt;br /&gt;
		counter &amp;lt;= counter + 1;&lt;br /&gt;
	end else if(in &amp;amp; !hit) begin&lt;br /&gt;
		counter &amp;lt;= counter + 1;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
endmodule&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cbira</name></author>
	</entry>
</feed>