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

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
PIC18F46J50 FAMILY
10.2
PORTA is a 7-bit wide, bidirectional port. It may also
function as a 5-bit or 6-bit port, depending on the oscil-
lator mode selected. Setting a TRISA bit (= 1) will make
the corresponding PORTA pin an input (i.e., put the
corresponding output driver in a High-Impedance
mode). Clearing a TRISA bit (= 0) will make the
corresponding PORTA pin an output (i.e., put the
contents of the output latch on the selected pin).
Reading the PORTA register reads the status of the
pins, whereas writing to it, will write to the port latch.
The Data Latch (LATA) register is also memory mapped.
Read-modify-write operations on the LATA register read
and write the latched output value for PORTA.
EXAMPLE 10-2:
DS39931D-page 136
CLRF
MOVLW
MOVFF
MOVLW
MOVWF
PORTA, TRISA and LATA Registers
LATA
0x1F
WREG,ANCON0
0xCF
TRISA
INITIALIZING PORTA
;Clearing the PORTA latches
;will cause the pins to drive
;low if configured as outputs
;Configure AN0-AN4 pins
;for digital input mode
;Example value used to
;initialize data direction
;Set RA<3:0> as inputs
;RA4 is unimplemented
;RA5 as output
;RA6 and RA7 as inputs
;(unless overridden by osc settings)
Most PORTA pins are multiplexed with analog (ANx)
functionality. In order to use the analog capable pins as
digital inputs, the corresponding PCFG bits in the
ANCON0 register must be set.
Pins, RA0 through RA3, may also be used as compara-
tor inputs by setting the appropriate bits in the CMxCON
registers and configuring the pins as analog inputs.
All PORTA pins have full CMOS output drivers.
The TRISA register controls the direction of the PORTA
pins, even when they are being used as analog inputs.
Note:
On a Power-on Reset (POR), RA5 and
RA<3:0> are configured as analog inputs
and read as ‘0’.
 2011 Microchip Technology Inc.

Related parts for PIC18F25J50