PIC16C622A-20E/P Microchip Technology, PIC16C622A-20E/P Datasheet - Page 27
![IC MCU OTP 2KX14 COMP 18DIP](/photos/6/76/67657/18-dip_300mil__sml.jpg)
PIC16C622A-20E/P
Manufacturer Part Number
PIC16C622A-20E/P
Description
IC MCU OTP 2KX14 COMP 18DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Specifications of PIC16C622A-20E/P
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, WDT
Number Of I /o
13
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2.5 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 125°C
Package / Case
18-DIP (0.300", 7.62mm)
Processor Series
PIC16C
Core
PIC
Data Bus Width
8 bit
Data Ram Size
128 B
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
13
Number Of Timers
8
Operating Supply Voltage
3 V to 5.5 V
Maximum Operating Temperature
+ 125 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
ICE2000, DM163022
Minimum Operating Temperature
- 40 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Data Converters
-
Connectivity
-
Lead Free Status / Rohs Status
Details
5.0
The PIC16C62X have two ports, PORTA and PORTB.
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.
5.1
PORTA is a 5-bit wide latch. RA4 is a Schmitt Trigger
input and an open drain output. Port RA4 is multiplexed
with the T0CKI clock input. All other RA port pins have
Schmitt Trigger input levels and full CMOS output
drivers. All pins have data direction bits (TRIS regis-
ters), which can configure these pins as input or output.
A '1' in the TRISA register puts the corresponding out-
put driver in a Hi-impedance mode. A '0' in the TRISA
register puts the contents of the output latch on the
selected pin(s).
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. So a
write to a port implies that the port pins are first read,
then this value is modified and written to the port data
latch.
The PORTA pins are multiplexed with comparator and
voltage reference functions. The operation of these
pins are selected by control bits in the CMCON
(comparator control register) register and the VRCON
(voltage reference control register) register. When
selected as a comparator input, these pins will read
as '0's.
FIGURE 5-1:
2003 Microchip Technology Inc.
WR
TRISA
WR
PORTA
Data
Bus
RD PORTA
I/O PORTS
PORTA and TRISA Registers
To Comparator
TRIS Latch
D
Data Latch
D
CK
CK
RD TRISA
Q
Q
Q
Q
BLOCK DIAGRAM OF
RA1:RA0 PINS
Input Mode
Schmitt Trigger
Q
Input Buffer
Analog
EN
V
V
P
N
DD
SS
D
V
SS
V
DD
Pin
I/O
TRISA controls the direction of the RA pins, even when
they are being used as comparator inputs. The user
must make sure to keep the pins configured as inputs
when using them as comparator inputs.
The RA2 pin will also function as the output for the
voltage reference. When in this mode, the V
very high impedance output and must be buffered prior
to any external load. The user must configure
TRISA<2> bit as an input and use high impedance
loads.
In one of the Comparator modes defined by the
CMCON register, pins RA3 and RA4 become outputs
of the comparators. The TRISA<4:3> bits must be
cleared to enable outputs to use this function.
EXAMPLE 5-1:
FIGURE 5-2:
CLRF
MOVLW
MOVWF
BSF
MOVLW
MOVWF
Note:
Data
Bus
WR
PORTA
WR
TRISA
RD PORTA
PORTA
0X07
CMCON
STATUS, RP0
0x1F
TRISA
On RESET, the TRISA register is set to all
inputs. The digital inputs are disabled and
the comparator inputs are forced to ground
to reduce excess current consumption.
To Comparator
D
D
TRIS Latch
Data Latch
CK
CK
RD TRISA
V
V
ROE
REF
BLOCK DIAGRAM OF RA2 PIN
Q
Q
Q
Q
INITIALIZING PORTA
;Initialize PORTA by setting
;output data latches
;Turn comparators off and
;enable pins for I/O
;functions
;Select Bank1
;Value used to initialize
;data direction
;Set RA<4:0> as inputs
;TRISA<7:5> are always
;read as '0'.
Input Mode
PIC16C62X
Schmitt Trigger
Analog
Q
Input Buffer
EN
V
V
P
N
D
DD
SS
DS30235J-page 25
V
SS
V
REF
DD
RA2
Pin
pin is a