PIC18F2331 MICROCHIP [Microchip Technology], PIC18F2331 Datasheet - Page 254
![no-image](/images/no-image-200.jpg)
PIC18F2331
Manufacturer Part Number
PIC18F2331
Description
28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
1.PIC18F2331.pdf
(396 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F2331-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2331-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
- Current page: 254 of 396
- Download datasheet (4Mb)
PIC18F2331/2431/4331/4431
20.1.3
The ACMOD<1:0> bits control the sequencing of the
A/D conversions. When ACSCH = 0, the A/D is
configured to sample and convert a single channel.
The ACMOD bits select which group to perform the
conversions and the GxSEL<1:0> bits select which
channel in the group is to be converted. If Single-shot
mode is enabled, the A/D interrupt flag will be set after
the channel is converted. If Continuous Loop mode is
enabled, the A/D interrupt flag will be set according to
the ADRS<1:0> bits.
When ACSHC = 1, multiple channel sequencing is
enabled and two sub-modes can be selected. The first
mode is Sequential mode with two settings. The first
setting is called SEQM1 and first samples and converts
the selected Group A channel and then samples and
converts the selected Group B channel. The second
mode is called SEQM2, and it samples and converts a
Group A channel, Group B channel, Group C channel
and finally a Group D channel.
The second multiple channel sequencing sub-mode is
Simultaneous Sampling mode. In this mode, there are
also two settings. The first setting is called STNM1 and
uses the two sample and hold circuits on the A/D
module. The selected Group A and B channels are
simultaneously sampled and then the Group A channel
is converted followed by the conversion of the Group B
channel. The second setting is called STNM2 and
starts the same as STNM1 but follows it with a
simultaneous sample of Group C and D channels. The
A/D module will then convert the Group C channel
followed by the Group D channel.
20.1.4
The PIC18F2331/2431/4331/4431 devices are capable
of triggering conversions from many different sources.
The same method used by all other microcontrollers of
setting the GO/DONE bit still works. The other trigger
sources are:
• RC3/INT0 pin
• Timer5 Overflow
• Input Capture 1 (IC1)
• CCP2 Compare Match
• Power Control PWM rising edge
These triggers are enabled using the SSRC<4:0> bits
(ADCON3<4:0>). Any combination of the five sources
can trigger a conversion by simply setting the corre-
sponding bit in ADCON3. When the trigger occurs, the
GO/DONE bit is automatically set by the hardware and
then cleared once the conversion completes.
DS39616B-page 252
CONVERSION SEQUENCING
TRIGGERING A/D CONVERSIONS
Preliminary
20.1.5
The following steps should be followed to initialize the
A/D module:
1.
2.
3.
4.
5.
6.
Configure the A/D module:
a)
b)
c)
d)
e)
Configure A/D interrupt (if required):
a)
b)
c)
d)
e)
f)
Turn On ADC:
a)
b)
Start sample/conversion sequence:
a)
b)
Wait
complete using one of the following options:
a)
b)
c)
Read A/D results, clear ADIF flag, reconfigure
trigger.
Configure analog pins, voltage reference
and digital I/O
Select A/D input channels
Select A/D Auto-conversion mode
(Single-shot or Continuous Loop)
Select A/D conversion clock
Select A/D conversion trigger
Set GIE bit
Set PEIE bit
Set ADIE bit
Clear ADIF bit
Select A/D trigger setting
Select A/D interrupt priority
Set ADON bit in ADCON0 register
Wait the required power-up setup time,
about 5-10 µs
Sample for a minimum of 2T
conversion by setting the GO/DONE bit.
The GO/DONE bit is set by the user in
software or by the module if initiated by a
trigger.
If T
then setting the GO/DONE bit starts a
sample period of the T
a conversion.
Poll for the GO/DONE bit to be cleared if in
Single-shot mode.
Wait for the A/D interrupt flag (ADIF) to be
set.
Poll for the BFEMT bit to be cleared to
signify that at least the first conversion has
completed.
A/D MODULE INITIALIZATION
STEPS
for
ACQ
is assigned a value (multiple of T
A/D
conversion/conversions
2003 Microchip Technology Inc.
ACQ
value, then starts
AD
and start
AD
to
),
Related parts for PIC18F2331
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC18F-LF1XK50](/images/no-image3.png)
Part Number:
Description:
20-Pin USB Flash Microcontrollers
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet:
![PIC18F6393T-I/PT](/photos/6/81/68123/c04-066_pf_tmb.jpg)
Part Number:
Description:
PIC18F With 128-segment LCD Driver And 12-bit ADC, 8KB Flash, 768B RAM, CCP, MSS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6493T-I/PT](/photos/6/81/68123/c04-066_pf_tmb.jpg)
Part Number:
Description:
PIC18F With 128-segment LCD Driver And 12-bit ADC, 16KB Flash, 768B RAM, CCP, MS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F8393T-I/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
PIC18F With 192-segment LCD Driver And 12-bit ADC, 8KB Flash, 768B RAM, CCP, MSS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F8493T-I/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
PIC18F With 192-segment LCD Driver And 12-bit ADC, 16KB Flash, 768B RAM, CCP, MS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6585-I/L](/photos/16/12/161282/68-plcc-large-300dpi-lyrd_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) 48KB 3328 RAM 52 I/O
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6680-I/L](/photos/16/12/161282/68-plcc-large-300dpi-lyrd_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) 64KB 3328 RAM 52 I/O
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F65K90T-I/MR](/photos/16/3/160368/qfn64_tmb.jpg)
Part Number:
Description:
32kB Flash, 2kB RAM, 1kB EE, NanoWatt XLP, LCD 64 QFN 9x9x0.9mm T/R
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F65K90T-I/PT](/photos/16/3/160367/tqfp-64_tmb.jpg)
Part Number:
Description:
32kB Flash, 2kB RAM, 1kB EE, NanoWatt XLP, LCD 64 TQFP 10x10x1mm T/R
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F87K90T-I/PT](/photos/40/31/403173/tqfp-80_tmb.jpg)
Part Number:
Description:
128kB Flash, 4kB RAM, 1kB EE, 16MIPS, NanoWatt XLP, LCD, 5V 80 TQFP 12x12x1mm T/
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F65K90-I/MR](/photos/16/3/160368/qfn64_tmb.jpg)
Part Number:
Description:
32kB Flash, 2kB RAM, 1kB EE, NanoWatt XLP, LCD 64 QFN 9x9x0.9mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F65K90-I/PT](/photos/16/3/160367/tqfp-64_tmb.jpg)
Part Number:
Description:
32kB Flash, 2kB RAM, 1kB EE, NanoWatt XLP, LCD 64 TQFP 10x10x1mm TRAY
Manufacturer:
Microchip Technology
![PIC18F87K90-I/PT](/photos/40/31/403173/tqfp-80_tmb.jpg)
Part Number:
Description:
128kB Flash, 4kB RAM, 1kB EE, 16MIPS, NanoWatt XLP, LCD, 5V 80 TQFP 12x12x1mm TR
Manufacturer:
Microchip Technology
![PIC1-100-JT](/images/no-image3.png)
Part Number:
Description:
SURFACE MOUNT POWER INDUCTORS
Manufacturer:
RCD [RCD COMPONENTS INC.]
Datasheet: