DM163035 Microchip Technology, DM163035 Datasheet - Page 41

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.
Changes from the previous lab include PORTC initialization so that all bits are ‘0’
except for the Least Significant bit (LSb) and the initialization of the LED_Output
variable.
3. Copy/paste the code in Example 3-13 into the Decide() section labeled:
EXAMPLE 3-13:
4. Copy/paste the code in Example 3-14 over the Do_Outputs() code from the
EXAMPLE 3-14:
This code simply assigns the contents of the LED_Output variable to the PORTC
register.
5. Copy/paste the code in Example 3-15 over the main() code from the previous
EXAMPLE 3-15:
Compile the project. There should be no errors.
//Assign the manipulated contents of the
//LED_Output variable to the PORTC register
//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
//least significant bit is set to 1 and all other bits are
//cleared to 0
LED_Output = 0b00000001;
//If neither of these conditions are true, simply shift
//the LED_Output variable's contents to the Left by 1 bit
//position
//ADD DECISION CODE HERE
previous lab.
lab to incorporate the Decide().
PORTC = LED_Output;
if((LED_Output == 0b10000000) || (LED_Output == 0b00000000))
else LED_Output <<=1;
Initialize(); //Initialize the relevant registers
while(1)
{
}
Decide(); //Make any decisions
Do_Outputs(); //Perform any outputs
Timing();//Sets execution rate of the
General Purpose Input/Output Labs
//Software Control Loop
DO_OUTPUTS() CODE FOR LAB 4
MAIN() CODE FOR LAB 4
DECIDE()CODE FOR LAB 4
DS41369A-page 37

Related parts for DM163035