DM163045 Microchip Technology, DM163045 Datasheet - Page 85

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.
EXAMPLE 5-3:
4. Copy/paste the code in Example 5-4 into the Get_Inputs() section labeled:
Analog-to-Digital Converter Peripheral Labs
//Configure Port:
//Configure the ADC module:
//ADD GET INPUTS CODE HERE
//Disable pin output driver (See TRIS register)
TRISB4 = 1;
// Configure pin as analog
ANS10 = 1;
//Configure RC0, RC1, RC2 and RC3 as digital output
PORTC = 0;
TRISC0 = 0;
TRISC1 = 0;
TRISC2 = 0;
TRISC3 = 0;
ANS4 = 0;
ANS5 = 0;
ANS6 = 0;
ANS7 = 0;
//Select ADC conversion clock Frc
ADCS0 = 1;
ADCS1 = 1;
ADCS2 = 1;
//Configure voltage reference using VDD
VCFG = 0;
//Select ADC input channel Pin 13 (RB4/AN10)
CHS0 = 0;
CHS1 = 1;
CHS2 = 0;
CHS3 = 1;
//Select result format left justified
ADFM = 0;
//Turn on ADC module
ADON = 1;
INITIALIZE CODE FOR COMPARATOR LAB 1
DS41369A-page 81

Related parts for DM163045