PIC18F1220-I/SO Microchip Technology Inc., PIC18F1220-I/SO Datasheet - Page 161

no-image

PIC18F1220-I/SO

Manufacturer Part Number
PIC18F1220-I/SO
Description
Microcontroller; 4 KB Flash; 256 RAM; 256 EEPROM; 16 I/O; 18-Pin-SOIC
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F1220-I/SO

A/d Inputs
7-Channel, 10-Bit
Cpu Speed
10 MIPS
Eeprom Memory
256 Bytes
Input Output
16
Interface
USART
Memory Type
Flash
Number Of Bits
8
Package Type
18-pin SOIC
Programmable Memory
4K Bytes
Ram Size
256 Bytes
Speed
20 MHz
Timers
1-8-bit, 3-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device
The value in the ADRESH/ADRESL registers is not
modified for a Power-on Reset. The ADRESH/ADRESL
registers will contain unknown data after a Power-on
Reset.
After the A/D module has been configured as desired,
the selected channel must be acquired before the con-
version is started. The analog input channels must
have their corresponding TRIS bits selected as an
input. To determine acquisition time, see Section 17.1
“A/D Acquisition Requirements”. After this acquisi-
tion time has elapsed, the A/D conversion can be
started. An acquisition time can be programmed to
occur between setting the GO/DONE bit and the actual
start of the conversion.
FIGURE 17-2:
 2004 Microchip Technology Inc.
Legend:
V
AIN
Rs
ANALOG INPUT MODEL
C
V
I
R
SS
C
R
LEAKAGE
ANx
PIN
T
IC
HOLD
SS
C
5 pF
PIN
= input capacitance
= threshold voltage
= leakage current at the pin due to
= interconnect resistance
= sampling switch
= sample/hold capacitance (from DAC)
= sampling switch resistance
various junctions
V
DD
V
V
T
T
= 0.6V
= 0.6V
I
± 500 nA
LEAKAGE
To do an A/D Conversion:
1.
2.
3.
4.
5.
6.
7.
R
IC
Configure the A/D module:
• Configure analog pins, voltage reference and
• Select A/D input channel (ADCON0)
• Select A/D acquisition time (ADCON2)
• Select A/D conversion clock (ADCON2)
• Turn on A/D module (ADCON0)
Configure A/D interrupt (if desired):
• Clear ADIF bit
• Set ADIE bit
• Set GIE bit
Wait the required acquisition time (if required).
Start conversion:
• Set GO/DONE bit (ADCON0 register)
Wait for A/D conversion to complete, by either:
• Polling for the GO/DONE bit to be cleared
OR
• Waiting for the A/D interrupt
Read A/D Result registers (ADRESH:ADRESL);
clear bit, ADIF, if required.
For the next conversion, go to step 1 or step 2,
as required. The A/D conversion time per bit is
defined as T
required before the next acquisition starts.
digital I/O (ADCON1)
1k
PIC18F1220/1320
V
DD
SS
Sampling
Switch
6V
5V
4V
3V
2V
AD
R
SS
. A minimum wait of 2 T
Sampling Switch
5 6 7 8 9 10 11
V
SS
C
HOLD
DS39605C-page 159
= 120 pF
(k )
AD
is

Related parts for PIC18F1220-I/SO