DM163045 Microchip Technology, DM163045 Datasheet - Page 66

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 62
TM
4.2.4
4.2.4.1
To configure the peripherals used in this lab, the following registers are used:
1. Comparator C1 Control Register 0: CM1CON0 (Register 8-1 in Section 8 of the
4.2.4.2
In this lab, Comparator 1 on the PIC16F690 is configured to perform a simple compare.
A potentiometer connected to the inverting input (C12IN0-) of the comparator will be
compared against the 2.5V connected to the non-inverting input (C1IN+) from a simple
voltage divider circuit. An LED connected to the output of Comparator 1 (C1OUT) will
light or turn off as follows:
• inverting reference > non-inverting reference = C1OUT is low = LED OFF
• inverting reference < non-inverting reference = C1OUT is high = LED ON
The PICDEM™ Development Board configuration schematic is shown in Figure 4-1.
FIGURE 4-1:
The software flowchart for this lab is shown in Figure 4-2.
Lab Development Board User’s Guide
- Enables Comparator C1.
- Configures Comparator output polarity.
- Enables the Comparator result to be available internal only or on the C1OUT
- Select inverting and non-inverting Comparator 1 reference input sources.
PIC16F690 Data Sheet)
pin (pin 17).
J8
Lab 1: Simple Compare
NEW REGISTERS USED IN THIS LAB
OVERVIEW
10
1
2
3
4
5
6
7
8
9
U2
C12IN0-
C1OUT
SCHEMATIC FOR COMPARATOR LAB 1
C1IN+
20
19
18
17
16
15
14
13
12
11
J9
LED1
V
R4
470Ω
SS
V
DD
V
R1
10KΩ
R2
10KΩ
SS
© 2009 Microchip Technology Inc.
V
DD
V
R3
100KΩ
SS

Related parts for DM163045