DM163035 Microchip Technology, DM163035 Datasheet - Page 68

KIT DEVELOPMENT PICDEM LAB

DM163035

Manufacturer Part Number
DM163035
Description
KIT DEVELOPMENT PICDEM LAB
Manufacturer
Microchip Technology
Type
MCUr
Datasheet

Specifications of DM163035

Contents
Board, Cable, Components, CD, PICkit Programmer
Processor To Be Evaluated
PIC10F, PIC12F615, PIC16F616
Data Bus Width
8 bit
Operating Supply Voltage
1.3 V to 5 V
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC10, PIC12, PIC16
Silicon Core Number
PIC10F, PIC12F, PIC16F
Silicon Family Name
PIC10F2xx, PIC12F6xx, PIC16F6xx
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC10F206, PIC16F690, PIC16F819
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PICDEM
DS41369A-page 64
TM
2. Copy/paste the code in Example 4-2 into the main() section labeled:
EXAMPLE 4-2:
3. Compile the project. There should be no errors.
4.2.4.4
Program the PIC16F690. The LED connected to the C1OUT pin should light when the
voltage present on the C12IN0- pin is less than the 2.5V present on the C1IN+ pin and
turn off when the 2.5V is exceeded.
The solution for this project is located in the
C:\PICDEM_Lab\Comparator_Labs\Comparator_Lab1\solution directory.
4.2.5
4.2.5.1
To configure the peripherals used in this lab, the following registers are used:
1. Voltage Reference Control Register: VRCON (Register 8-5 in Section 8 of the
4.2.5.2
This lab expands on Lab 1 by utilizing the internal Comparator Voltage Reference
(CV
voltage reference that can be used by the Comparator 1 non-inverting reference input
so that external components are not needed such as the resistor voltage divider used
in the previous lab. The CV
• Independent comparator operation
• Two 16-level voltage ranges
• Ratiometric with V
Lab Development Board User’s Guide
- Enables either the Comparator Voltage Reference or the 0.6V constant
- Selects either a High or Low resolution 16-level voltage range.
- Enable a 0.6V reference.
- Uses three bits to configure the reference voltage level.
Note:
Note:
REF
//ADD MAIN CODE HERE
PIC16F690 Data Sheet).
reference as the non-inverting reference input to Comparator C1 or
Comparator C2.
Initialize(); //Initialize the relevant registers
while(1);
) feature on the PIC16F690. The CV
TESTING THE APPLICATION
Lab 2: Using the Comparator Voltage Reference
NEW REGISTERS USED IN THIS LAB
OVERVIEW
The inclusion of the while loop forces the microcontroller to sit and wait at
a “known” instruction. At start-up, the contents of the program memory are
unknown. Without the while loop, the microcontroller will continue to run
through each address in program memory executing whatever resides at a
particular address. This could have adverse effects on the application.
This application uses two pins that are used during the programming pro-
cess (ICSPDATA and ICSPCLK). The jumper wires connecting these pins
to the application circuit may need to be disconnected while programming
if there are problems with the MPLAB IDE connecting to the PIC16F690.
DD
MAIN() CODE FOR COMPARATOR LAB 1
REF
features:
REF
provides an internally generated
© 2009 Microchip Technology Inc.

Related parts for DM163035