PIC16LF874A-I/PT Microchip Technology, PIC16LF874A-I/PT Datasheet - Page 43

IC, 8BIT MCU, PIC16LF, 20MHZ, TQFP-44

PIC16LF874A-I/PT

Manufacturer Part Number
PIC16LF874A-I/PT
Description
IC, 8BIT MCU, PIC16LF, 20MHZ, TQFP-44
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets

Specifications of PIC16LF874A-I/PT

Controller Family/series
PIC16LF
No. Of I/o's
33
Eeprom Memory Size
128Byte
Ram Memory Size
192Byte
Cpu Speed
20MHz
No. Of Timers
3
Core Size
8 Bit
Program Memory Size
4 Kwords
Core Processor
PIC
Speed
10MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
33
Program Memory Type
FLASH
Eeprom Size
128 x 8
Ram Size
192 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
4.0
Some pins for these I/O ports are multiplexed with an
alternate function for the peripheral features on the
device. In general, when a peripheral is enabled, that
pin may not be used as a general purpose I/O pin.
Additional information on I/O ports may be found in the
PICmicro™ Mid-Range Reference Manual (DS33023).
4.1
PORTA is a 6-bit wide, bidirectional port. The corre-
sponding data direction register is TRISA. 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. All
write operations are read-modify-write operations.
Therefore, a write to a port implies that the port pins are
read, the value is modified and then written to the port
data latch.
Pin RA4 is multiplexed with the Timer0 module clock
input to become the RA4/T0CKI pin. The RA4/T0CKI
pin is a Schmitt Trigger input and an open-drain output.
All other PORTA pins have TTL input levels and full
CMOS output drivers.
Other PORTA pins are multiplexed with analog inputs
and the analog V
and the comparators. The operation of each pin is
selected by clearing/setting the appropriate control bits
in the ADCON1 and/or CMCON registers.
The TRISA register controls the direction of the port
pins even when they are being used as analog inputs.
The user must ensure the bits in the TRISA register are
maintained set when using them as analog inputs.
 2003 Microchip Technology Inc.
Note:
I/O PORTS
PORTA and the TRISA Register
On a Power-on Reset, these pins are con-
figured as analog inputs and read as ‘0’.
The comparators are in the off (digital)
state.
REF
input for both the A/D converters
EXAMPLE 4-1:
FIGURE 4-1:
BCF
BCF
CLRF
BSF
MOVLW
MOVWF
MOVLW
MOVWF
Data
Bus
WR
PORTA
WR
TRISA
RD
TRISA
RD PORTA
To A/D Converter or Comparator
Note 1: I/O pins have protection diodes to V
STATUS, RP0
STATUS, RP1
PORTA
STATUS, RP0
0x06
ADCON1
0xCF
TRISA
D
TRIS Latch
D
Data Latch
CK
CK
Q
Q
Q
Q
PIC16F87XA
INITIALIZING PORTA
BLOCK DIAGRAM OF
RA3:RA0 PINS
;
; Bank0
; Initialize PORTA by
; clearing output
; data latches
; Select Bank 1
; Configure all pins
; as digital inputs
; Value used to
; initialize data
; direction
; Set RA<3:0> as inputs
; RA<5:4> as outputs
; TRISA<7:6>are always
; read as '0'.
Q
Analog
Input
Mode
EN
DS39582B-page 41
D
DD
V
V
N
P
SS
DD
and V
SS
TTL
Input
Buffer
I/O pin
.
(1)

Related parts for PIC16LF874A-I/PT