User manual

PICDEM
TM
Mechatronics Demo Board User’s Guide
DS51557C-page 22 © 2006 Microchip Technology Inc.
Instructions
Pressing SW2 toggles LED (D0) on and off.
Discussion
Switch debouncing is done to ensure that mechanical contact chatter in the switch is
not mistaken for more than one button push. Debouncing also ensures that for every
one press of the button, only one function is executed. In this project that function is
toggling a LED.
Note: See Section 2.2 “Loading Projects in MPLAB
®
IDE” for the location of
the source files for this project and all subsequent projects.