DM163045 Microchip Technology, DM163045 Datasheet - Page 89

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.
5.2.4
5.2.4.1
In this lab, the ADC peripheral on the PIC16F690 is used to alter the frequency of
Pulse-Width Modulated Waveform (PWM) in relation to the temperature sensed by a
thermistor connected to the input of the ADC peripheral. The PWM waveform is gener-
ated by simply toggling the RC0 voltage level high and low. The thermistor is used to
create a voltage divider in conjunction with a 1KΩ resistor to vary the voltage into the
ADC input. This thermistor is a Negative Temperature Coefficient type (NTC) meaning
that as the temperature of the device increases, the resistance effectively decreases.
The voltage drop across the thermistor is converted by the ADC and the ADRESH
result then used to manipulate a TMR0 preload value (see GPIO Lab 3) that will be
used in the Timing() to vary the execution speed of the software control loop and ulti-
mately the frequency of the PWM waveform. The PWM will be connected to an
N-Channel MOSFET used to drive the 8Ω speaker on the PICDEM Lab Development
Board. The schematic for this lab is shown in Figure 5-5.
FIGURE 5-5:
Referring to the schematic in Figure 5-5, the RC0 connects to the gate of the IRFD010
N-Channel MOSFET Q1. Resistor R4 pulls the gate input low ensuring the transistor
will remain OFF until a high voltage level is present on the RC0 output. When the PWM
transitions high, Q1 is ON and current flows through the 8Ω speaker. The 100Ω R3
resistor is used to limit the current through the speaker to maintain manufacturer spec-
ified power ratings. In this way, any change in temperature around the thermistor will
alter the frequency of the PWM, thereby changing the audible frequency emitted from
the speaker.
Analog-to-Digital Converter Peripheral Labs
J8
Lab 2: Audible Temperature Sensor
OVERVIEW
Thermistor
10
1
2
3
4
5
6
7
8
9
SCHEMATIC FOR ADC LAB 2
V
RB4/AN10
U2
DD
V
R1
1KΩ
SS
RC0
R2
10KΩ
20
19
18
17
16
15
14
13
12
11
J9
V
R4
10KΩ
SS
V
DD
V
R3
100Ω
SS
Q1
IRFD010 N-Channel
MOSFET
SP+
SP-
J19
DS41369A-page 85
8Ω
LS1

Related parts for DM163045