PIC18C658 MICROCHIP [Microchip Technology], PIC18C658 Datasheet - Page 99

no-image

PIC18C658

Manufacturer Part Number
PIC18C658
Description
High-Performance Microcontrollers with CAN Module
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C658-1/CL
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-1/L
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-ES
Manufacturer:
Microchip
Quantity:
131
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip
Quantity:
385
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-I/L
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip
Quantity:
601
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658T-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
8.6
PORTF is an 8-bit wide, bi-directional 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
hi-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
reads and writes the latched output value for PORTF.
PORTF is multiplexed with several analog peripheral
functions including the A/D converter inputs and com-
parator inputs, outputs, and voltage reference.
FIGURE 8-9:
 2000 Microchip Technology Inc.
Note 1: On a Power-on Reset, the RF6:RF0 pins
PORT/Comparator Select
2: To configure PORTF as digital I/O, turn off
Comparator Data Out
PORTF, LATF, and TRISF Registers
Note:
RD PORTF
WR TRISF
To A/D Converter
Data Bus
WR LATF
or
WR PORTF
are configured as inputs and read as ’0’.
comparators and set ADCON1 value.
PORTF RF1/AN6/C2OUT, RF2/AN5/C1OUT BLOCK DIAGRAM
I/O pins have diode protection to V
Data
TRIS Latch
D
D
CK
CK
RD TRISF
Latch
RD LATF
Q
Q
Q
Q
Advanced Information
DD
and V
0
1
Q
SS
.
EN
EXAMPLE 8-6:
CLRF
CLRF
MOVLW
MOVWF
MOVLW
MOVWF
MOVLW
MOVWF
D
V
V
P
Schmitt
Trigger
PORTF
LATF
0x07
CMCON
0x0F
ADCON1
0xCF
TRISF
N
SS
Analog
Input
Mode
DD
INITIALIZING PORTF
; Initialize PORTF by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
;
; Turn off comparators
;
; Set PORTF as digital I/O
; Value used to
; initialize data
; direction
; Set RF3:RF0 as inputs
; RF5:RF4 as outputs
; RF7:RF6 as inputs
PIC18CXX8
I/O Pin
DS30475A-page 99

Related parts for PIC18C658