![Microchip Technology PIC24FV16KM204 FAMILY Скачать руководство пользователя страница 211](http://html1.mh-extra.com/html/microchip-technology/pic24fv16km204-family/pic24fv16km204-family_datasheet_1785842211.webp)
2013 Microchip Technology Inc.
Advance Information
DS33030A-page 211
PIC24FV16KM204 FAMILY
To perform an A/D conversion:
1.
Configure the A/D module:
a) Configure the port pins as analog inputs
and/or select band gap reference inputs
(ANS<12:10>, ANS<5:0>).
b) Select voltage reference source to match
the expected range on the analog inputs
(AD1CON2<15:13>).
c)
Select the analog conversion clock to
match the desired data rate with the
processor clock (AD1CON3<7:0>).
d) Select the appropriate sample/conversion
sequence (AD1CON1<7:4> and
AD1CON3<12:8>).
e) Configure the MODE12 bit to select A/D
resolution (AD1CON1<10>).
f)
Select how conversion results are
presented in the buffer (AD1CON1<9:8>).
g) Select the interrupt rate (AD1CON2<6:2>).
h) Turn on the A/D module (AD1CON1<15>).
2.
Configure the A/D interrupt (if required):
a) Clear the AD1IF bit.
b) Select the A/D interrupt priority.
To perform an A/D sample and conversion using
Threshold Detect scanning:
1.
Configure the A/D module:
a) Configure the port pins as analog inputs
(ANS<12:10>, ANS<5,0>).
b) Select the voltage reference source to
match the expected range on the analog
inputs (AD1CON2<15:13>).
c)
Select the analog conversion clock to
match the desired data rate with the
processor clock (AD1CON3<7:0>).
d) Select the appropriate sample/conversion
sequence (AD1CON1<7:4> and
AD1CON3<12:8>).
e) Configure the MODE12 bit to select A/D
resolution (AD1CON1<10>).
f)
Select how the conversion results are
presented in the buffer (AD1CON1<9:8>).
g) Select the interrupt rate (AD1CON2<6:2>).
2.
Configure the threshold compare channels:
a)
Enable auto-scan; set the ASEN bit
(AD1CON5<15>).
b)
Select the Compare mode “Greater Than,
Less Than or Windowed”; set the CMx bits
(AD1CON5<1:0>).
c)
Select the threshold compare channels to
be scanned (AD1CSSH, AD1CSSL).
d)
If the CTMU is required as a current
source for a threshold compare channel,
enable the corresponding CTMU channel
(AD1CTMENH, AD1CTMENL).
e)
Write the threshold values into the
corresponding ADC1BUFn registers.
f)
Turn on the A/D module (AD1CON1<15>).
3.
Configure the A/D interrupt (OPTIONAL):
a)
Clear the AD1IF bit.
b)
Select the A/D interrupt priority.
Note:
If performing an A/D sample and
conversion using Threshold Detect in
Sleep Mode, the RC A/D clock source
must be selected before entering into
Sleep mode.
Содержание PIC24FV16KM204 FAMILY
Страница 12: ...PIC24FV16KM204 FAMILY DS33030A page 12 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 28: ...PIC24FV16KM204 FAMILY DS33030A page 28 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 34: ...PIC24FV16KM204 FAMILY DS33030A page 34 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 120: ...PIC24FV16KM204 FAMILY DS33030A page 120 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 130: ...PIC24FV16KM204 FAMILY DS33030A page 130 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 136: ...PIC24FV16KM204 FAMILY DS33030A page 136 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 158: ...PIC24FV16KM204 FAMILY DS33030A page 158 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 172: ...PIC24FV16KM204 FAMILY DS33030A page 172 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 194: ...PIC24FV16KM204 FAMILY DS33030A page 194 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 206: ...PIC24FV16KM204 FAMILY DS33030A page 206 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 228: ...PIC24FV16KM204 FAMILY DS33030A page 228 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 232: ...PIC24FV16KM204 FAMILY DS33030A page 232 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 260: ...PIC24FV16KM204 FAMILY DS33030A page 260 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 312: ...PIC24FV16KM204 FAMILY DS33030A page 312 Advance Information 2013 Microchip Technology Inc ...
Страница 313: ... 2013 Microchip Technology Inc Advance Information DS33030A page 313 PIC24FV16KM204 FAMILY ...
Страница 315: ... 2013 Microchip Technology Inc Advance Information DS33030A page 315 PIC24FV16KM204 FAMILY ...
Страница 316: ...PIC24FV16KM204 FAMILY DS33030A page 316 Advance Information 2013 Microchip Technology Inc ...
Страница 317: ... 2013 Microchip Technology Inc Advance Information DS33030A page 317 PIC24FV16KM204 FAMILY ...
Страница 322: ...PIC24FV16KM204 FAMILY DS33030A page 322 Advance Information 2013 Microchip Technology Inc ...
Страница 324: ...PIC24FV16KM204 FAMILY DS33030A page 324 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 330: ...PIC24FV16KM204 FAMILY DS33030A page 330 Advance Information 2013 Microchip Technology Inc NOTES ...
Страница 334: ...PIC24FV16KM204 FAMILY DS33030A page 334 Advance Information 2013 Microchip Technology Inc NOTES ...