English
Language : 

PIC18F14K22LIN Datasheet, PDF (23/62 Pages) Microchip Technology – 20-Pin Flash Microcontrollers 20-Pin Flash Microcontrollers
PIC18F14K22LIN
3.2 PORTC, TRISC and LATC
Registers
PORTC is an 8-bit wide, bidirectional port. It functions
the same as described in the “PIC18F1XK22/LF1XK22
Data Sheet” (DS41365) with the following differences.
One bit is dedicated to the LIN transceiver and one bit
is not available. No pins are associated with this func-
tion. Only RC<5:0> are available on pins. The corre-
sponding data direction register is TRISC. The TRISC
bits must be set as ‘1xxx xxxx’.
The PORTC Data Latch register (LATC) is also mem-
ory mapped. Read-modify-write operations on the
LATC register read and write the latched output value
for PORTC.
Note:
On a Power-on Reset, RC<7:6> and
RC<3:0> are configured as analog inputs
and read as ‘0’.
EXAMPLE 3-2: INITIALIZING PORTC
CLRF
CLRF
MOVLW
MOVWF
PORTC
LATC
0FFh
TRISC
; Initialize PORTC by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> as inputs
REGISTER 3-6: PORTC: PORTC REGISTER
R/W-x
LINRESET
bit 7
R/W-x
—
R/W-x
RC5
R/W-x
RC4
R/W-x
RC3
R/W-x
RC2
R/W-x
RC1
R/W-x
RC0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
bit 6
bit 5-0
LINRESET: LIN Reset Input bit
1 = LIN Reset not asserted
0 = LIN Reset asserted
RC6: No function
RC<5:0>: PORTC I/O Pin bits
1 = Port pin is > VIH
0 = Port pin is < VIL
 2011 Microchip Technology Inc.
Preliminary
DS41580A-page 27