PIC18F25J50 MICROCHIP [Microchip Technology], PIC18F25J50 Datasheet - Page 143

no-image

PIC18F25J50

Manufacturer Part Number
PIC18F25J50
Description
28/44-Pin, Low-Power, High-Performance USB Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F25J50-I/SO
Manufacturer:
MICROCHIP
Quantity:
1 001
Part Number:
PIC18F25J50-I/SP
Manufacturer:
MICROCHIP
Quantity:
1 001
Part Number:
PIC18F25J50-I/SS
Manufacturer:
MICROCHIP
Quantity:
1 001
Part Number:
PIC18F25J50T-I/SO
Manufacturer:
MICROCHIP
Quantity:
1 001
Part Number:
PIC18F25J50T-I/SS
Manufacturer:
MICROCHIP
Quantity:
1 001
10.4
PORTC is an 8-bit wide, bidirectional port. The corre-
sponding Data Direction register is TRISC. Setting a
TRISC bit (= 1) will make the corresponding PORTC
pin an input (i.e., put the corresponding output driver in
a High-Impedance mode). Clearing a TRISC bit (= 0)
will make the corresponding PORTC pin an output (i.e.,
put the contents of the output latch on the selected pin).
The Data Latch register (LATC) is also memory
mapped. Read-modify-write operations on the LATC
register read and write the latched output value for
PORTC.
PORTC is multiplexed with several peripheral functions
(see
buffers.
When enabling peripheral functions, care should be
taken in defining TRIS bits for each PORTC pin. Some
peripherals override the TRIS bit to make a pin an output,
while other peripherals override the TRIS bit to make a
pin an input. The user should refer to the corresponding
peripheral section for additional information.
Pins, RC4 and RC5, are multiplexed with the USB
module. Depending on the configuration of the module,
they can serve as the differential data lines for the on-
chip USB transceiver, or the data inputs from an external
USB transceiver. When used as general purpose inputs,
both RC4 and RC5 input buffers depend on the level of
the voltage applied to the V
EXAMPLE 10-4:
 2011 Microchip Technology Inc.
CLRF
MOVLB
BSF
BCF
BSF
MOVLW
MOVWF
Table
PORTC, TRISC and LATC
Registers
10-7). The pins have Schmitt Trigger input
LATC
0x0F
ANCON1, PCFG11, BANKED
UCON, USBEN
UCFG, UTRDIS
0x3F
TRISC
INITIALIZING PORTC
USB
pin, instead of V
; Initialize output data
; latch values for logic
; output low value.
; ANCONx registers are
; not in access bank
;Configure RC2/AN11 for digital input mode
;Disable USB transceiver to use RC4/RC5 as
;general purpose inputs
;Disable USB module
;Disable USB transceiver
; RC0 configured as digital input
; RC1 configured as digital input
; RC2 configured as digital input
; RC4 configured as digital input
; RC5 configured as digital input
; RC6 configured as digital output
; RC7 configured as digital output
DD
, like
PIC18F46J50 FAMILY
all other general purpose I/O pins. Therefore, if the RC4
or RC5 general purpose input capability will be used, the
V
Unlike other PORTC pins, RC4 and RC5 do not have
TRISC bits associated with them. As digital ports, they
can only function as digital inputs. When configured for
USB operation, the data direction is determined by the
configuration and status of the USB module at a given
time. If an external transceiver is used, RC4 and RC5
always function as inputs from the transceiver. If the on-
chip transceiver is used, the data direction is determined
by the operation being performed by the module at that
time.
The contents of the TRISC register are affected by
peripheral overrides. Reading TRISC always returns
the current contents, even though a peripheral device
may be overriding one or more of the pins.
USB
Note:
pin should not be left floating.
On a Power-on Reset, PORTC pins
(except RC2, RC4 and RC5) are config-
ured as digital inputs. RC2 will default as
an analog input (controlled by the
ANCON1 register). To use pins, RC4 and
RC5, as digital inputs, the USB module
must be disabled (UCON<3> = 0) and the
on-chip USB transceiver must be dis-
abled (UCFG<3> = 1). The internal USB
transceiver has a POR value of enabled.
DS39931D-page 143

Related parts for PIC18F25J50