PIC16LF1938-I/MV Microchip Technology, PIC16LF1938-I/MV Datasheet - Page 158
PIC16LF1938-I/MV
Manufacturer Part Number
PIC16LF1938-I/MV
Description
IC MCU 8BIT 28KB FLASH 28UQFN
Manufacturer
Microchip Technology
Series
PIC® XLP™ 16Fr
Datasheet
1.PIC16LF1938-IMV.pdf
(452 pages)
Specifications of PIC16LF1938-I/MV
Core Processor
PIC
Core Size
8-Bit
Speed
32MHz
Connectivity
I²C, LIN, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LCD, POR, PWM, WDT
Number Of I /o
25
Program Memory Size
28KB (16K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
1K 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
Package / Case
28-UFQFN Exposed Pad
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
- Current page: 158 of 452
- Download datasheet (5Mb)
PIC16(L)F1938/9
15.2.6
This is an example procedure for using the ADC to
perform an Analog-to-Digital conversion:
1.
2.
3.
4.
5.
6.
7.
8.
DS41574A-page 158
Note 1: The global interrupt can be disabled if the
Configure Port:
• Disable pin output driver (Refer to the TRIS
• Configure pin as analog (Refer to the ANSEL
Configure the ADC module:
• Select ADC conversion clock
• Configure voltage reference
• Select ADC input channel
• 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).
register)
register)
enabled)
2: Refer to
A/D CONVERSION PROCEDURE
user is attempting to wake-up from Sleep
and resume in-line code execution.
Requirements”.
Section 15.3 “A/D Acquisition
(1)
(2)
.
Preliminary
EXAMPLE 15-1:
;This code block configures the ADC
;for polling, Vdd and Vss references, Frc
;clock and AN0 input.
;
;Conversion start & polling for completion
; are included.
;
BANKSEL
MOVLW
MOVWF
BANKSEL
BSF
BANKSEL
BSF
BANKSEL
MOVLW
MOVWF
CALL
BSF
BTFSC
GOTO
BANKSEL
MOVF
MOVWF
BANKSEL
MOVF
MOVWF
ADCON1
B’11110000’ ;Right justify, Frc
ADCON1
TRISA
TRISA,0
ANSEL
ANSEL,0
ADCON0
B’00000001’ ;Select channel AN0
ADCON0
SampleTime
ADCON0,ADGO ;Start conversion
ADCON0,ADGO ;Is conversion done?
$-1
ADRESH
ADRESH,W
RESULTHI
ADRESL
ADRESL,W
RESULTLO
A/D CONVERSION
2011 Microchip Technology Inc.
;
;clock
;Vdd and Vss Vref
;
;Set RA0 to input
;
;Set RA0 to analog
;
;Turn ADC On
;Acquisiton delay
;No, test again
;
;Read upper 2 bits
;store in GPR space
;
;Read lower 8 bits
;Store in GPR space
Related parts for PIC16LF1938-I/MV
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
IC, 8BIT MCU, PIC16LF, 32MHZ, QFN-28
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC16LF, 32MHZ, QFN-28
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC16LF, 32MHZ, DIP-18
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC16LF, 20MHZ, TQFP-44
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
7 KB Flash, 384 Bytes RAM, 32 MHz Int. Osc, 16 I/0, Enhanced Mid Range Core, Nan
Manufacturer:
Microchip Technology
Part Number:
Description:
14KB Flash, 512B RAM, LCD, 11x10b ADC, EUSART, NanoWatt XLP 28 SOIC .300in T/R
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
14KB Flash, 512B RAM, LCD, 11x10b ADC, EUSART, NanoWatt XLP 28 SSOP .209in T/R
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
MCU PIC 14KB FLASH XLP 28-SSOP
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU PIC 14KB FLASH XLP 28-SOIC
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU PIC 512B FLASH XLP 28-UQFN
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU PIC 14KB FLASH XLP 28-SPDIP
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU 7KB FLASH 256B RAM 40-UQFN
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU 7KB FLASH 256B RAM 44-TQFP
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU 14KB FLASH 1KB RAM 28-UQFN
Manufacturer:
Microchip Technology
Part Number:
Description:
MCU PIC 14KB FLASH XLP 40-UQFN
Manufacturer:
Microchip Technology