PIC18F25K20-I/SO Microchip Technology, PIC18F25K20-I/SO Datasheet - Page 268

IC PIC MCU FLASH 16KX16 28SOIC

PIC18F25K20-I/SO

Manufacturer Part Number
PIC18F25K20-I/SO
Description
IC PIC MCU FLASH 16KX16 28SOIC
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr

Specifications of PIC18F25K20-I/SO

Program Memory Type
FLASH
Program Memory Size
32KB (16K x 16)
Package / Case
28-SOIC (7.5mm Width)
Core Processor
PIC
Core Size
8-Bit
Speed
64MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
24
Eeprom Size
256 x 8
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 11x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1.5 KB
Interface Type
CCP/ECCP/EUSART/I2C/MSSP/SPI
Maximum Clock Frequency
64 MHz
Number Of Programmable I/os
25
Number Of Timers
4
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
11-ch x 10-bit
Package
28SOIC W
Device Core
PIC
Family Name
PIC18
Maximum Speed
64 MHz
Operating Supply Voltage
2.5|3.3 V
A/d Bit Size
10 bit
A/d Channels Available
11
Height
2.31 mm
Length
17.87 mm
Supply Voltage (max)
3.6 V
Supply Voltage (min)
1.8 V
Width
7.49 mm
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC164112 - VOLTAGE LIMITER MPLAB ICD2 VPP
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC18F2XK20/4XK20
19.2.9
This is an example procedure for using the ADC to
perform an Analog-to-Digital conversion:
1.
2.
3.
4.
5.
6.
7.
8.
DS41303D-page 266
Note 1: The global interrupt can be disabled if the
Configure Port:
• Disable pin output driver (See TRIS register)
• Configure pin as analog
Configure the ADC module:
• Select ADC conversion clock
• Configure voltage reference
• Select ADC input channel
• Select result format
• Select acquisition delay
• Turn on ADC module
Configure ADC interrupt (optional):
• Clear ADC interrupt flag
• Enable ADC interrupt
• Enable peripheral interrupt
• Enable global interrupt
Wait the required acquisition time
Start conversion by setting the GO/DONE bit.
Wait for ADC conversion to complete by one of
the following:
• Polling the GO/DONE bit
• Waiting for the ADC interrupt (interrupts
Read ADC Result
Clear the ADC interrupt flag (required if interrupt
is enabled).
enabled)
2: Software delay required if ACQT bits are
A/D CONVERSION PROCEDURE
user is attempting to wake-up from Sleep
and resume in-line code execution.
set to zero delay. See Section 19.3 “A/D
Acquisition Requirements”.
(1)
(2)
.
Preliminary
EXAMPLE 19-1:
;This code block configures the ADC
;for polling, Vdd and Vss as reference, Frc
clock and AN0 input.
;
;Conversion start & polling for completion
; are included.
;
MOVLW
MOVWF
MOVLW
MOVWF
BSF
BSF
MOVLW
MOVWF
BSF
ADCPoll:
BTFSC
BRA
; Result is complete - store 2 MSbits in
; RESULTHI and 8 LSbits in RESULTLO
MOVFF
MOVFF
B’10101111’ ;right justify, Frc,
ADCON2
B’00000000’ ;ADC ref = Vdd,Vss
ADCON1
TRISA,0
ANSEL,0
B’00000001’ ;AN0, ADC on
ADCON0
ADCON0,GO
ADCON0,GO
ADCPoll
ADRESH,RESULTHI
ADRESL,RESULTLO
A/D CONVERSION
© 2008 Microchip Technology Inc.
; & 12 TAD ACQ time
;
;Set RA0 to input
;Set RA0 to analog
;
;Start conversion
;Is conversion done?
;No, test again

Related parts for PIC18F25K20-I/SO