DM163045 Microchip Technology, DM163045 Datasheet - Page 32

no-image

DM163045

Manufacturer Part Number
DM163045
Description
PICDEM Lab Development Kit (with PICkit 3) General Purpose
Manufacturer
Microchip Technology
Series
PICDEM™r
Type
MCUr
Datasheet

Specifications of DM163045

Contents
Board, PIC kit 3
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
PIC Micro® MCU

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM163045
Manufacturer:
MICROCHIP
Quantity:
12 000
PICDEM
DS41369A-page 28
TM
EXAMPLE 3-5:
3. Copy/paste the code in Example 3-6 into the Timing() section labeled:
EXAMPLE 3-6:
4. Copy/paste the code in Example 3-7 over the main() code from the previous lab
EXAMPLE 3-7:
Compile the project. There should be no errors.
3.3.5.3
Program the PIC16F690. The LEDs connected to the individual PORTC pins should
now all flash on/off in 1 second intervals.
The solution for this project is located in the
C:\PICDEM_Lab\GPIO_Labs\GPIO_Lab2\solution directory.
Lab Development Board User’s Guide
//ADD TIMING CODE HERE
to incorporate the Timing().
RC0 ^= 1;//XOR current RC0 value with 1
RC1 ^= 1;//XOR current RC1 value with 1
RC2 ^= 1;//XOR current RC2 value with 1
RC3 ^= 1;//XOR current RC3 value with 1
RC4 ^= 1;//XOR current RC4 value with 1
RC5 ^= 1;//XOR current RC5 value with 1
RC6 ^= 1;//XOR current RC6 value with 1
RC7 ^= 1;//XOR current RC7 value with 1
//--------DELAY 1second-------------------------
//Variable used in delay loop
unsigned int delay_var1 = 45571;
unsigned char delay_var2 = 3;
//Nested while loops to implement a 1 second delay
//Decrement delay_var2, if 0 jump out of loop
while(--delay_var2)
{
}
Initialize(); //Initialize the relevant registers
while(1)
{
}
TESTING THE APPLICATION
//Decrement delay_var1, if 0 jump out of loop
while(--delay_var1);
Do_Outputs(); //Perform any outputs
Timing();//Sets execution rate of the
//Software Control Loop
DO_OUTPUT() CODE FOR LAB 2
TIMING() FOR LAB 2
MAIN() CODE FOR LAB 2
© 2009 Microchip Technology Inc.

Related parts for DM163045