DM163035 Microchip Technology, DM163035 Datasheet - Page 56

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 52
TM
EXAMPLE 3-24:
It should be noted that the Global Interrupt Enable bit (GIE) is set last in the
Example 3-24. This ensures that interrupts will not occur during the Initialize(),
having adverse consequences on code operation.
Lab Development Board User’s Guide
//Clear PORTC to a known state
//Set the least significant bit to 1 so that it can be
//shifted through
//Clear the PORTA register to a known state
//Configure PORTC's ANALOG/DIGITAL pins as all Digital
//Configure PORTC pins as all output
//i.e. 1 = Input, 0 = Output
//Configure PORTA bit RA0 as Digital input
//Configure Timer0 to overflow every 5mS
//Select a 1:32 prescaler
//Initialize the direction flag to shift bits from
//right-to-left
//(i.e. 0 = Shift PORTC bits from right-to-left
//
//Initialize LED_Output to all zeros
//Configure for external interrupts on RA2
PORTC = 0b00000001;
PORTA = 0b00000000;
ANS4 = 0;//Associated with RC0
ANS5 = 0;//Associated with RC1
ANS6 = 0;//Associated with RC2
ANS7 = 0;//Associated with RC3
ANS8 = 0;//Associated with RC6
ANS9 = 0;//Associated with RC7
TRISC0 = 0;//Associated with RC0
TRISC1 = 0;//Associated with RC1
TRISC2 = 0;//Associated with RC2
TRISC3 = 0;//Associated with RC3
TRISC4 = 0;//Associated with RC4
TRISC5 = 0;//Associated with RC5
TRISC6 = 0;//Associated with RC6
TRISC7 = 0;//Associated with RC7
ANS2 = 0;
TRISA2 = 1;
T0CS = 0; //Select FOSC/4 as Timer0 clock source
T0SE = 0; //Increment TMR0 on rising clock edge
PSA = 0; //Assign prescaler to Timer0
PS0 = 0;
PS1 = 0;
PS2 = 1;
direction = 0;
LED_Output = 0b00000000;
INTEDG = 0; //Interrupt to occur on High-to-LOW
INTE = 1; //Enable the external interrupt
INTF = 0; //Clear the external interrupt flag
GIE = 1;//Enable interrupt capability on the
1 = Shift PORTC bits from left-to-right
//transition of RA2 voltage
//PIC16F690 ***ALWAYS DONE LAST*****
INITIALIZE() CODE FOR GPIO LAB 6
© 2009 Microchip Technology Inc.

Related parts for DM163035