User manual

Table Of Contents
PICDEM
TM
LAB DEVELOPMENT
BOARD USERS GUIDE
© 2009 Microchip Technology Inc. DS41369A-page 61
Chapter 4. Comparator Peripheral Labs
4.1 INTRODUCTION
The following labs cover some of the fundamental features of the Comparator 1
peripheral found on the PIC16F690 including some unique applications. These
peripherals are very useful mixed signal building blocks as they provide analog
functionality independent of program execution. The labs in this section will
demonstrate this functionality, then introduce intelligence to implement a relatively high
resolution temperature sensor measurement application.
4.2 COMPARATOR LABS
4.2.1 Reference Documentation
All documentation is available on the PICDEM™ Lab Development Kit accompanying
CD-ROM:
PIC16F690 Data Sheet (DS41262)
- Section 4.0: I/O Ports
- Section 5.0: Timer0 Module
- Section 6.0: Timer1 Module
- Section 8.0: Comparator Module
“Introduction to MPLAB
®
IDE and HI-TECH C
®
PRO for the PIC10/12/16 MCU
Family Lite Mode Compiler Tutorial” (DS41322)
4.2.2 Comparator Labs
The labs that will be implemented in this chapter are:
Lab 1: Simple Comparator
Lab 2: Using the Internal Comparator Voltage Reference
Lab 3: Higher Resolution Sensor Readings Using a Single Comparator
4.2.3 Equipment Required
To complete the labs in this section, the following components are required:
1. 2 – 10 KΩ resistors
2. 4 – 470Ω resistor
3. 1 – 100 KΩ potentiometer
4. 4 – Light Emitting Diodes
5. 1 – 1N4148 diodes
6. 1 – 1 μF capacitor
7. PIC16F690 populating socket U2
8. Assorted jumper wires