PIC17C752-08/CL MICROCHIP [Microchip Technology], PIC17C752-08/CL Datasheet - Page 82

no-image

PIC17C752-08/CL

Manufacturer Part Number
PIC17C752-08/CL
Description
High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC17C7XX
10.6
PORTF is an 8-bit wide bi-directional port. The corre-
sponding data direction register is DDRF. A '1' in DDRF
configures the corresponding port pin as an input. A '0'
in the DDRF register configures the corresponding port
pin as an output. Reading PORTF reads the status of
the pins, whereas writing to PORTF will write to the
respective port latch.
All eight bits of PORTF are multiplexed with 8 channels
of the 10-bit A/D converter.
Upon reset the entire Port is automatically configured
as analog inputs, and must be configured in software to
be a digital I/O.
FIGURE 10-13: BLOCK DIAGRAM OF RF7:RF0
DS30289A-page 82
WR PORTF
WR DDRF
RD PORTF
Data bus
V
AIN
Note: I/O pins have protection diodes to V
PORTF and DDRF Registers
PCFG3:PCFG0
CHS3:CHS0
Data Latch
DDRF Latch
D
CK
D
CK
RD DDRF
Q
Q
Q
Q
DD
and V
SS
Q
.
EN
EN
D
To other pads
To other pads
Example 10-6
ize PORTF. The Bank Select Register (BSR) must be
selected to Bank 5 for the port to be initialized. The fol-
lowing example uses the MOVLB instruction to load the
BSR register for bank selection.
EXAMPLE 10-6: INITIALIZING PORTF
MOVLB
MOVLW
MOVPF
CLRF
MOVLW
MOVWF
5
0x0E
ADCON1
PORTF, F
0x03
DDRF
V
V
shows an instruction sequence to initial-
P
N
DD
SS
; Select Bank 5
; Configure PORTF as
; Digital
; Initialize PORTF data
;
;
;
; Value used to init
;
; Set RF<1:0> as inputs
;
1998 Microchip Technology Inc.
latches before
the data direction
register
data direction
RF<7:2> as outputs
ST
input
buffer
I/O pin

Related parts for PIC17C752-08/CL