DM163045 Microchip Technology, DM163045 Datasheet - Page 45

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.
A new function called Get_Inputs() is used to check the RA2 pin voltage. Referring
to Figure 3-12, the RA2 pin connected to the push button (SW1) is pulled to V
a 10 KΩ resistor. This pull-up resistor eliminates noise on the pin that could trigger
“false” push button presses. The second terminal of the push button is connected to
V
transition from V
Get_Inputs() is shown in Figure 3-20.
FIGURE 3-20:
Referring to the flowchart in Figure 3-20, the Get_Inputs() first checks the voltage
level on the RA2 pin. If the voltage is logic low (= 0 or V
using a new support routine called Delay_5mS() to allow any switch bouncing to set-
tle. The Delay_5mS() is based off of the Timer0 peripheral as discussed in Lab 3. The
software flowchart for Delay_5mS() is shown in Figure 3-21.
SS
. In this way, when a user presses the push button the voltage present on RA2 will
Contents of direction
remain unchanged
Get_Inputs()
RA0 = 0
END
?
DD
General Purpose Input/Output Labs
NO
(high or ‘1’) to V
GET_INPUTS() SOFTWARE FLOWCHART FOR LAB 5
YES
NO
SS
(low or ‘0’). The software flowchart for the
Toggle contents of
Delay_5mS()
direction
RA0 = 0
?
YES
SS
), a 5mS delay is implemented
Debounces signal
on RA2
DS41369A-page 41
DD
using

Related parts for DM163045