DM163045 Microchip Technology, DM163045 Datasheet - Page 53

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-23:
Note the removal of the Get_Inputs() from the previous lab. This code will now be
handled by an Interrupt Service Routine (ISR) whenever the push button is pressed.
The PB_PressISR() flowchart is shown in Figure 3-24.
FIGURE 3-24:
Global Variables:
• 8-bit variable LED_Output will be used to light
• 1-bit variable direction used to determine the
the LEDs connected to PORTC
direction of the sequential LED flashing
0 = shift PORTC bits right-to-left
1 = shift PORTC bits left-to-right
General Purpose Input/Output Labs
NO
MAIN() SOFTWARE CONTROL LOOP FLOWCHART FOR
GPIO LAB 6
PB_PRESSISR() FOR LAB 6 SHOWING SWITCH DEBOUNCE
direction = direction
Loop Forever
PB_PressISR()
INTE and INTF
Clear INTF flag
RA2 pin = 0
bits set
RETURN
?
?
YES
NO
YES
NO
Do_Outputs()
Initialize()
Decide()
Timing()
main()
Toggle direction
Delay for 5mS
RA2 pin = 0
?
YES
DS41369A-page 49

Related parts for DM163045