DM163035 Microchip Technology, DM163035 Datasheet - Page 50

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 46
TM
3. Copy/paste the code in Example 3-19 into the Get_Inputs() at the section
EXAMPLE 3-19:
4. Copy/paste the code in Example 3-20 into the Decide() over the code from the
EXAMPLE 3-20:
Lab Development Board User’s Guide
0b00000000)) LED_Output = 0b10000000;
0b00000000)) LED_Output = 0b00000001;
labeled:
//ADD GET_INPUTS CODE HERE
previous lab.
//Check for a push button press (i.e. RA2 = 0)
if (RA2 == 0)
{
}
//Otherwise keep direction the same as it was
else direction = direction;
if(direction == 0)
{
//First check if LED_Output variable has most
//significant bit set to 1 or if LED_Output variable is
//all 0's.
//If so, re initialize the LED_Output variable so that
//the most significant bit is set to 1 and all other
//bits are 0
//If neither of these conditions are true, simply shift
//the LED_Output variable's contents to the Left by 1
//bit position
}
else
{
//First check if LED_Output variable has the least
//significant bit set
//to 1 or if LED_Output variable is all 0's.
//If so, re initialize the LED_Output variable so that
//the least significant bit is set to 1 and all other
//bits are 0
//If neither of these conditions are true, simply shift
//the LED_Output variable's contents to the Right by 1
//bit position
}
Delay_5mS(); //Delay to debounce
//Check if push button is still pressed
if(RA2 == 0) direction ^= 1; //If so, toggle the
if((LED_Output == 0b00000001) || (LED_Output ==
else LED_Output >>=1;
if((LED_Output == 0b10000000) || (LED_Output ==
else LED_Output <<=1;
GET_INPUTS() CODE FOR GPIO LAB 5
DECIDE() CODE FOR GPIO LAB 5
//direction bit
© 2009 Microchip Technology Inc.

Related parts for DM163035