DM163045 Microchip Technology, DM163045 Datasheet - Page 38

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
PICDEM
DS41369A-page 34
TM
3.3.7
3.3.7.1
This lab shifts a high bit in the PORTC register from right-to-left each time through the
software loop sequentially lighting the LEDs connected to the PORTC pins in 1 second
intervals as dictated by the Timing(). This lab adds some new functional blocks to
the main() software control loop as shown in Figure 3-15.
FIGURE 3-15:
The addition of an 8-bit global variable (can be manipulated by any function) called
LED_Output is used. This variable will be acted upon by the new Decide() by shift-
ing a high bit in LED_Output from right-to-left each time this function is called. The
flowchart for the Decide() is shown in Figure 3-16.
FIGURE 3-16:
Lab Development Board User’s Guide
Global Variables:
8-bit LED_Output
Lab 4: Rotate LEDs
OVERVIEW
Loop Forever
MAIN() SOFTWARE CONTROL LOOP FLOWCHART FOR
LAB 4
DECIDE() FLOWCHART FOR LAB 4
LED_Output = 0b10000000
LED_Output = 0b00000000
Shift contents of LED_Output
variable left by 1 bit position
Decide()
END
or
?
Do_Outputs()
Initialize()
NO
Timing()
Decide()
main()
LED_Output variable initialize to 0b00000001
in Initialize()
YES
LED_Output = 0b00000001
© 2009 Microchip Technology Inc.

Related parts for DM163045