Professional Documents
Culture Documents
4.5 PORTE and TRISE Register FIGURE 4-9: PORTE BLOCK DIAGRAM
(IN I/O PORT MODE)
Note: PORTE and TRISE are not implemented
on the 28-pin devices. Data Data Latch
Bus D Q
PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6
and RE2/CS/AN7) which are individually configurable WR
I/O pin(1)
Port
as inputs or outputs. These pins have Schmitt Trigger CK
input buffers.
TRIS Latch
The PORTE pins become the I/O control inputs for the D Q
microprocessor port when bit PSPMODE (TRISE<4>) is WR
set. In this mode, the user must make certain that the TRIS
CK Schmitt
TRISE<2:0> bits are set and that the pins are configured Trigger
Input
as digital inputs. Also, ensure that ADCON1 is config- Buffer
ured for digital I/O. In this mode, the input buffers are
RD
TTL. TRIS
Register 4-1 shows the TRISE register which also
controls the Parallel Slave Port operation.
Q D
PORTE pins are multiplexed with analog inputs. When
selected for analog input, these pins will read as ‘0’s. ENEN
TRISE controls the direction of the RE pins, even when RD Port
they are being used as analog inputs. The user must
make sure to keep the pins configured as inputs when
using them as analog inputs. Note 1: I/O pins have protection diodes to VDD and VSS.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
- n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
CS
WR
RD
PORTD<7:0>
IBF
OBF
PSPIF
CS
WR
RD
PORTD<7:0>
IBF
OBF
PSPIF
CLKO (= FOSC/4)
Data Bus
8
M 1
0
RA4/T0CKI U M Sync
pin X U
1 0 2 TMR0 Reg
X Cycles
T0SE
T0CS
PSA Set Flag bit TMR0IF
on Overflow
PRESCALER
0
M 8-bit Prescaler
U
Watchdog 1 X 8
Timer
0 1
WDT Enable bit
MUX PSA
WDT
Time-out