PIC16F884-E/P Microchip Technology, PIC16F884-E/P Datasheet - Page 59

IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,DIP,40PIN,PLASTIC

PIC16F884-E/P

Manufacturer Part Number
PIC16F884-E/P
Description
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,DIP,40PIN,PLASTIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F884-E/P

Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
7KB (4K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
DVA18XP400 - DEVICE ADAPTER 18F4220 PDIP 40LD
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F884-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
3.6
PORTD
corresponding
(Register 3-12). Setting a TRISD bit (= 1) will make the
corresponding PORTD pin an input (i.e., put the
corresponding output driver in a High-Impedance mode).
Clearing a TRISD bit (= 0) will make the corresponding
PORTD pin an output (i.e., enable the output driver and
put the contents of the output latch on the selected pin).
Example 3-5 shows how to initialize PORTD.
Reading the PORTD register (Register 3-11) reads the
status of the pins, whereas writing to it will write to the
PORT latch. All write operations are read-modify-write
operations. Therefore, a write to a port implies that the
port pins are read, this value is modified and then written
to the PORT data latch.
REGISTER 3-11:
REGISTER 3-12:
© 2009 Microchip Technology Inc.
bit 7
Legend:
R = Readable bit
-n = Value at POR
bit 7-0
bit 7
Legend:
R = Readable bit
-n = Value at POR
bit 7-0
Note 1: PORTD is available on PIC16F884/887
TRISD7
R/W-1
R/W-x
RD7
(1)
PORTD and TRISD Registers
is a 8-bit wide, bidirectional port. The
only.
data
RD<7:0>: PORTD General Purpose I/O Pin bit
1 = Port pin is > V
0 = Port pin is < V
TRISD<7:0>: PORTD Tri-State Control bit
1 = PORTD pin configured as an input (tri-stated)
0 = PORTD pin configured as an output
TRISD6
R/W-1
R/W-x
RD6
PORTD: PORTD REGISTER
TRISD: PORTD TRI-STATE REGISTER
direction
W = Writable bit
‘1’ = Bit is set
W = Writable bit
‘1’ = Bit is set
TRISD5
register
IH
IL
R/W-1
R/W-x
RD5
is
PIC16F882/883/884/886/887
TRISD
TRISD4
R/W-1
R/W-x
RD4
U = Unimplemented bit, read as ‘0’
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
‘0’ = Bit is cleared
TRISD3
R/W-1
R/W-x
The TRISD register (Register 3-12) controls the PORTD
pin output drivers, even when they are being used as
analog inputs. The user should ensure the bits in the
TRISD register are maintained set when using them as
analog inputs. I/O pins configured as analog input always
read ‘0’.
EXAMPLE 3-5:
RD3
BANKSEL PORTD
CLRF
BANKSEL TRISD
MOVLW
MOVWF
PORTD
B‘00001100’
TRISD
TRISD2
R/W-x
R/W-1
RD2
INITIALIZING PORTD
;
;Init PORTD
;
;Set RD<3:2> as inputs
;and set RD<7:4,1:0>
;as outputs
x = Bit is unknown
x = Bit is unknown
TRISD1
R/W-x
R/W-1
RD1
DS41291F-page 57
TRISD0
R/W-1
R/W-x
RD0
bit 0
bit 0

Related parts for PIC16F884-E/P