PIC18LF8520-I/PTG Microchip Technology, PIC18LF8520-I/PTG Datasheet - Page 119

no-image

PIC18LF8520-I/PTG

Manufacturer Part Number
PIC18LF8520-I/PTG
Description
IC MCU FLASH 16KX16 80TQFP
Manufacturer
Microchip Technology
Series
PIC® 18Fr
Datasheets

Specifications of PIC18LF8520-I/PTG

Core Processor
PIC
Core Size
8-Bit
Speed
40MHz
Connectivity
EBI/EMI, I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LVD, POR, PWM, WDT
Number Of I /o
68
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 16x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
80-TFQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
10.6
PORTF is an 8-bit wide, bidirectional port. The corre-
sponding data direction register is TRISF. Setting a
TRISF bit (= 1) will make the corresponding PORTF pin
an input (i.e., put the corresponding output driver in a
high-impedance mode). Clearing a TRISF bit (= 0) will
make the corresponding PORTF pin an output (i.e., put
the contents of the output latch on the selected pin).
Read-modify-write operations on the LATF register,
read and write the latched output value for PORTF.
PORTF is multiplexed with several analog peripheral
functions, including the A/D converter inputs and
comparator inputs, outputs and voltage reference.
FIGURE 10-13:
 2004 Microchip Technology Inc.
Note 1: On a Power-on Reset, the RF6:RF0 pins
2: To configure PORTF as digital I/O, turn off
PORTF, LATF and TRISF Registers
Port/Comparator Select
Comparator Data Out
are configured as inputs and read as ‘0’.
comparators and set ADCON1 value.
Note 1: I/O pins have diode protection to V
RD PORTF
To A/D Converter
WR TRISF
Data Bus
WR LATF
or
WR PORTF
PIC18F6520/8520/6620/8620/6720/8720
PORTF RF1/AN6/C2OUT, RF2/AN7/C1OUT PINS BLOCK DIAGRAM
TRIS Latch
Data Latch
D
D
RD TRISF
CK
CK
RD LATF
Q
Q
Q
Q
DD
0
1
and V
Q
EXAMPLE 10-6:
SS
CLRF
CLRF
MOVLW
MOVWF
MOVLW
MOVWF
MOVLW
MOVWF
.
EN
D
PORTF
LATF
0x07
CMCON
0x0F
ADCON1 ; Set PORTF as digital I/O
0xCF
TRISF
V
P
N
Schmitt
Trigger
V
Analog
Input
Mode
DD
SS
; Initialize PORTF by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
;
; Turn off comparators
;
; Value used to
; initialize data
; direction
; Set RF3:RF0 as inputs
; RF5:RF4 as outputs
; RF7:RF6 as inputs
INITIALIZING PORTF
DS39609B-page 117
I/O pin

Related parts for PIC18LF8520-I/PTG