English
Language : 

PIC18F97J60_11 Datasheet, PDF (157/492 Pages) Microchip Technology – 64/80/100-Pin, High-Performance, 1-Mbit Flash Microcontrollers with Ethernet
PIC18F97J60 FAMILY
11.6 PORTE, TRISE and
LATE Registers
PORTE is implemented as a bidirectional port in two
different ways:
• 64-pin devices: 6 bits wide (RE<5:0>)
• 80-pin and 100-pin devices: 8 bits wide (RE<7:0>)
The corresponding Data Direction register is TRISE.
Setting a TRISE bit (= 1) will make the corresponding
PORTE pin an input (i.e., put the corresponding output
driver in a High-Impedance mode). Clearing a TRISE
bit (= 0) will make the corresponding PORTE pin an
output (i.e., put the contents of the output latch on the
selected pin). All pins on PORTE are digital only and
tolerate voltages up to 5.5V.
The Output Latch register (LATE) is also memory
mapped. Read-modify-write operations on the LATE
register read and write the latched output value for
PORTE.
All pins on PORTE are implemented with Schmitt
Trigger input buffers. Each pin is individually
configurable as an input or output.
Note: These pins are configured as digital inputs
on any device Reset.
On 100-pin devices, PORTE is multiplexed with the
system bus as part of the external memory interface.
I/O port and other functions are only available when the
interface is disabled by setting the EBDIS bit
(MEMCON<7>). When the interface is enabled,
PORTE is the high-order byte of the multiplexed
address/data bus (AD<15:8>). The TRISE bits are also
overridden.
Each of the PORTE pins has a weak internal pull-up. A
single control bit can turn on all of the pull-ups. This is
performed by setting bit, REPU (LATA<6>). The weak
pull-up is automatically turned off when the port pin is
configured as an output. The pull-ups are disabled on
all device Resets.
PORTE is also multiplexed with Enhanced PWM
Outputs B and C for ECCP1 and ECCP3 and Outputs
B, C and D for ECCP2. For 80-pin and 100-pin devices,
their default assignments are on PORTE<6:0>. For
64-pin devices, their default assignments are on
PORTE<5:0> and PORTD<0>. On 80-pin and 100-pin
devices, the multiplexing for the outputs of ECCP1 and
ECCP3 is controlled by the ECCPMX Configuration bit.
Clearing this bit reassigns the P1B/P1C and P3B/P3C
outputs to PORTH.
For 80-pin and 100-pin devices operating in Micro-
controller mode, pin, RE7, can be configured as the
alternate peripheral pin for the ECCP2 module and
Enhanced PWM Output 2A. This is done by clearing
the CCP2MX Configuration bit.
When the Parallel Slave Port is active on PORTD, three
of the PORTE pins (RE0, RE1 and RE2) are configured
as digital control inputs for the port. The control
functions are summarized in Table 11-11. The reconfig-
uration occurs automatically when the PSPMODE
control bit (PSPCON<4>) is set. Users must still make
certain the corresponding TRISE bits are set to
configure these pins as digital inputs.
EXAMPLE 11-5: INITIALIZING PORTE
CLRF
CLRF
MOVLW
MOVWF
PORTE
LATE
03h
TRISE
; Initialize PORTE by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RE<1:0> as inputs
; RE<7:2> as outputs
 2011 Microchip Technology Inc.
DS39762F-page 157