Introduction to Microcontrollers Lab Manual - Microchip
Introduction to Microcontrollers Lab Manual - Microchip
Introduction to Microcontrollers Lab Manual - Microchip
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5.1 OBJECTIVE<br />
5.2 PRE-LAB<br />
<strong>Lab</strong> 5. Compara<strong>to</strong>r<br />
This lab covers the following concepts:<br />
• PIC24F Compara<strong>to</strong>r Hardware module<br />
• PIC24F Compara<strong>to</strong>r Voltage Reference Module<br />
5.2.1 Reference Material<br />
LABS<br />
• PIC24FJ256GB110 Family Data Sheet (DS39897)<br />
• 16-Bit MCU and DSC Programmer's Reference <strong>Manual</strong> (DS70157)<br />
• MPLAB IDE User’s Guide (DS51519)<br />
• PIC24F Family Reference <strong>Manual</strong> – Section 8. Interrupts (DS39707)<br />
• PIC24F Family Reference <strong>Manual</strong> – Section 12. Peripheral Pin Select (DS39711)<br />
• PIC24F Family Reference <strong>Manual</strong> – Section 19. Dual Compara<strong>to</strong>r Module<br />
(DS39710)<br />
• PIC24F Family Reference <strong>Manual</strong> – Section 20. Compara<strong>to</strong>r Voltage Reference<br />
Module (DS39708)<br />
5.2.2 Compara<strong>to</strong>r<br />
A compara<strong>to</strong>r compares two analog inputs and switches its output <strong>to</strong> indicate which is<br />
larger. When the Vin+ input is larger than <strong>to</strong> the Vin- input, the output is high. When the<br />
Vin- input is larger than the Vin+ input, the output is low.<br />
FIGURE 5-1: LAB 5 COMPARATOR DESCRIPTION<br />
Schematic symbol for single<br />
compara<strong>to</strong>r<br />
Inputs Output<br />
Vin+ > Vin- High<br />
Vin+ < Vin- Low<br />
Vin+ = Vin- Indeterminate<br />
The PIC24FJ256GB110 compara<strong>to</strong>r input/output configurations are completely user<br />
programmable using the CMxCON registers.<br />
2011 <strong>Microchip</strong> Technology Inc. DS51963A-page 37