DM163045 Microchip Technology, DM163045 Datasheet - Page 47

no-image

DM163045

Manufacturer Part Number
DM163045
Description
PICDEM Lab Development Kit (with PICkit 3) General Purpose
Manufacturer
Microchip Technology
Series
PICDEM™r
Type
MCUr
Datasheet

Specifications of DM163045

Contents
Board, PIC kit 3
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
PIC Micro® MCU

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM163045
Manufacturer:
MICROCHIP
Quantity:
12 000
© 2009 Microchip Technology Inc.
FIGURE 3-22:
Similar to the previous lab, Decide() checks the LED_Output variable value before
executing the shift to ensure that the variable is not all 0’s or that the Most Significant
bit, for a left shift, or Least Significant bit, for a right shift, are not ‘1’, indicating that the
shift that follows will fill the LED_Output variable with 0’s.
The Do_Outputs() simply assigns the contents of the LED_Output variable to the
PORTC register lighting the connected LEDs accordingly.
3.4.4.3
Using the firmware developed in the previous lab, make the following changes:
Copy/paste the code in
section marked:
//--------------------DATA MEMORY----------------------
EXAMPLE 3-16:
unsigned char LED_Output;//Variable used to set/clear PORTC bits
bit direction;//Variable to select direction of shifting LEDs
LED_Output = 0b10000000
LED_Output = 0b00000000
PROCEDURE
LED_Output left
Shift contents of
by 1 bit position
General Purpose Input/Output Labs
or
?
NO
VARIABLE DECLARATIONS FOR LAB 5
DECIDE() SOFTWARE FLOWCHART FOR LAB 5
Example 3-16
YES
LED_Output =
0b00000001
YES
direction = 0
into the top of the firmware source template under the
Decide()
?
LED_Output = 0b00000001
LED_Output = 0b00000000
END
LED_Output right
Shift contents of
by 1 bit position
NO
or
?
NO
LED_Output = 0b10000000
DS41369A-page 43
YES

Related parts for DM163045