DM163035 Microchip Technology, DM163035 Datasheet - Page 63

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
© 2009 Microchip Technology Inc.
EXAMPLE 3-28:
//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
//Enable Weak Pull-ups on RA2
//Configure Timer0 to overflow every 5mS
//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 RA2 Interrupt-On-Change
//Read PORTA to latch the current RA2 voltage level
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;
WPUA2 = 1;
RABPU = 0; //Enable PORTA/PORTB Pull-ups
T0CS = 0; //Select FOSC/4 as Timer0 clock source
T0SE = 0; //Increment TMR0 on rising clock edge
PSA = 0; //Assign prescaler to Timer0
//Select a 1:32 prescaler
PS0 = 0;
PS1 = 0;
PS2 = 1;
direction = 0;
LED_Output = 0b00000000;
IOCA2 = 1; //Enable RA2 interrupt-on-change
RABIE = 1; //Enable change interrupts
RABIF = 0; //Clear the change interrupt flag
GIE = 1;//Enable interrupt capability on the
PORTA = PORTA;
1 = Shift PORTC bits from left-to-right
General Purpose Input/Output Labs
//PIC16F690 ***ALWAYS DONE LAST*****
INITIALIZE() CODE FOR GPIO LAB 8
DS41369A-page 59

Related parts for DM163035