
PICDEM TM Lab Development Board User’s Guide
12. Copy/paste the code in Example 3-2 into the Do_Outputs() section labeled:
/ /ADD DO_OUTPUTS CODE HERE
EXAMPLE 3-2:
DO_OUTPUT() CODE FOR LAB 1
RC0
RC1
RC2
RC3
RC4
RC5
RC6
RC7
=
=
=
=
=
=
=
=
1;//Make
0;//Make
1;//Make
1;//Make
0;//Make
1;//Make
0;//Make
1;//Make
RC0
RC1
RC2
RC3
RC4
RC5
RC6
RC7
(pin
(pin
(pin
(pin
(pin
(pin
(pin
(pin
16) HIGH (approx. Vdd)
15) LOW (approx. Vss)
14) HIGH (approx. Vdd)
7) HIGH (approx. Vdd)
6) LOW (approx. Vss)
5) HIGH (approx. Vdd)
8) LOW (approx. Vss)
9) HIGH (approx. Vdd)
13. Copy/paste the code in Example 3-3 into the main() section labeled:
/ /ADD MAIN CODE HERE
EXAMPLE 3-3:
MAIN() CODE FOR LAB 1
Initialize(); //Initialize the relevant registers
while(1) //Code within curly braces will loop forever
{
Do_Outputs(); //Perform any outputs
}
The project is now ready to compile and download to the PIC16F690.
14. Compile the project ensuring no errors.
15. Connect the PICkit? 2 Programmer/Debugger to an available USB port on the
PC and then to the ICSP? connector ICSP1 (J6) on the PICDEM Lab Develop-
ment Board. The PICkit 2 should recognize if a power source is not connected to
the PIC16F690 and provide target power.
16. In the MPLAB? IDE Project Workspace, select
Programmer>Select Programmer>PICkit 2 .
17. The PICkit 2 Programmer/Debugger toolbar should now be visible in the
DS41369A-page 24
? 2009 Microchip Technology Inc.