DM163035 Microchip Technology, DM163035 Datasheet - Page 32

KIT DEVELOPMENT PICDEM LAB

DM163035

Manufacturer Part Number
DM163035
Description
KIT DEVELOPMENT PICDEM LAB
Manufacturer
Microchip Technology
Type
MCUr
Datasheet

Specifications of DM163035

Contents
Board, Cable, Components, CD, PICkit Programmer
Processor To Be Evaluated
PIC10F, PIC12F615, PIC16F616
Data Bus Width
8 bit
Operating Supply Voltage
1.3 V to 5 V
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC10, PIC12, PIC16
Silicon Core Number
PIC10F, PIC12F, PIC16F
Silicon Family Name
PIC10F2xx, PIC12F6xx, PIC16F6xx
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC10F206, PIC16F690, PIC16F819
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
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 DM163035