User manual
Example Projects
© 2006 Microchip Technology Inc. DS51557C-page 21
2.3.1 Project 1: Hello World (Light a LED)
When learning to use a new computer language, the first practical lesson traditionally
instructs the user how to print “Hello World” on the screen. Staying with tradition, this
project will make your PICDEM Mechatronics Demo Board say “Hello World” in the
most practical way a microcontroller can – lighting a LED.
Objectives
1. Use the PIC16F917 to read a tactile switch input.
2. Implement switch debouncing.
3. Toggle a LED when a switch is pushed.
Applicable Technical Documents
PICkit 1™ Flash Starter Kit User’s Guide (DS40051): Exercise 2
Jumper Configuration
• RD7 (J10) to D0 (J14)
• RA0 (J13) to SW2 (J4)
FIGURE 2-2: PROJECT 1: JUMPER DIAGRAM
FIGURE 2-3: PROJECT 1: SCHEMATIC
PIC16F917
R4
SW2
10 kΩ
VDD
VDD
RA0
VSS
RD7
VDD
1 kΩ
R5
270 Ω
R36
30
11/32
2
12/31
D0