English
Language : 

PIC16F946 Datasheet, PDF (63/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F946
3.6 PORTE and TRISE Registers
PORTE is a 4-bit port with Schmitt Trigger input buffers.
RE<7:0> are individually configured as inputs or out-
puts. RE3 is only available as an input if MCLRE is ‘0’
in Configuration Word (Register 16-1)..
Note:
Analog lines that carry LCD signals
(i.e., SEGx, where x are segment identifi-
ers) are shown as direct connections to
the device pins. The signals are outputs
from the LCD module and may be
tri-stated, depending on the configuration
of the LCD module.
EXAMPLE 3-5: INITIALIZING PORTE
BCF
BCF
CLRF
BSF
BCF
MOVLW
MOVWF
CLRF
BCF
BCF
STATUS,RP0
STATUS,RP1
PORTE
STATUS,RP0
STATUS,RP1
0Fh
TRISE
ANSEL
STATUS,RP0
STATUS,RP1
;Bank 0
;
;Init PORTE
;Bank 1
;
;Set RE<3:0> as inputs
;
;Make RE<2:0> as I/O’s
;Bank 0
;
REGISTER 3-11:
PORTE – PORTE REGISTER (ADDRESS: 09h)
R/W-x R/W-x R/W-x R/W-x R/W-x
RE7
RE6
RE5
RE4
RE3
bit 7
R/W-x
RE2
R/W-x
RE1
R/W-x
RE0
bit 0
bit 7-0
RE<7:0>: PORTE I/O Pin bits
1 = Port pin is >VIH
0 = Port pin is <VIL
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
REGISTER 3-12:
TRISE – PORTE TRI-STATE REGISTER (ADDRESS: 89h)
R/W-1 R/W-1 R/W-1 R/W-1
R-1
R/W-1
TRISE7 TRISE6 TRISE5 TRISE4 TRISE3 TRISE2
bit 7
R/W-1
TRISE1
R/W-1
TRISE0
bit 0
bit 7-4
bit 3
bit 2-0
TRISE<7:4>: Data Direction bits
TRISE3: Data Direction bit. RE3 is always an input, so this bit always reads as a ‘1’
TRISE<2:0>: Data Direction bits
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
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 61