|
Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning ## Switch Bounce ## Switch Debouncing ## Schmitt Trigger * Adding Outputs * Adding Drivers Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt |
(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login Switch Debouncing<^< Switch Bounce | Course Index | Schmitt Trigger >^>(:nl:) Switch bounce is a problem when the switch is part of a counting system. Each time the switch is pressed, instead of the count increasing by one, it can increase by two, three or four, or more! The solution is to debounce the switch. This does not stop the mechanical bounces of the switch, but cuts out the repeated electrical pulses that the bounce otherwise causes. We add a debouncing circuit to the output of the switch unit. There are a number of techniques that can be used in the debouncing circuit. We will use a time delay. This relies on making the first of the electrical pulses trigger a long pulse that lasts longer than the train of pulses caused by the bouncing. To do this, add a time delay circuit between the switch unit and the counting system. ![]() The effect of this is illustrated in the following graphs. ![]() The counting system receives just a single pulse each time the switch is pressed. Switch bounce is very fast - a simple way of avoiding switch bounce problems is to simply make your program wait for a millisecond after a switch input is detected. (:nl:)(:table style="clear:both":)
| |
(:Summary: Website page footer:)
Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login
Page last modified on August 26, 2011, at 09:51 AM