THE CDP1851 and CDP1851C are CMOS programmable twoport I/Os designed for use as general-purpose I/O devices.
They are directly compatible with CDP1800-series microprocessors functioning at maximum clock frequency. Each port
can be programmed in either byte-I/O or bit-programmable
modes for interfacing with peripheral devices such as printers
and keyboards.
Both ports A and B can be separately programmed to be 8-bit
input or output ports with handshaking control lines, RDY and
STROBE. Only port A can be programmed to be a bidirectional
port. This configuration provides a means for communicating
with a peripheral device or microprocessor system on a single
8-bit bus for both transmitting and receiving data. Handshaking
signals are provided to maintain proper bus access control.
Port A handshaking lines are used for input control and port B
handshaking lines are used for output; therefore port B must be
in the bit-programmable mode where handshaking is not used.
Ports A and B can be separately bit programmed so that each
individual line can be designated as an input or output line. The
handshaking lines may also be individually programmed as
input or output when port A is not in bidirectional mode.
The CDP1851 has a supply-voltage range of 4V to 10.5V, and
the CDP1851C has a range of 4V to 6.5V. Both types are supplied in 40-lead dual-in-line plastic (E suffix) or hermetic
ceramic (D suffix) packages. The CDP1851C is also available
in chip form (H suffix).
CAUTION: Stresses above those listed in “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress only rating and operation
of the device at these or any other conditions above those indicated in the operational sections of this specification is not implied.
NOTE:
1. θJA is measured with the component mounted on an evaluation PC board in free air.
from Case for 10s max . . . . . . . . . . . . . . . . . . . . . . . . . . . +265oC
Operating ConditionsAt T
= Full Package-Temperature Range. For Maximum Reliability, Operating Conditions Should be
A
Selected so that Operation is Always within the Following Ranges:
LIMITS
CDP1851CDP1851C
PARAMETER
MINMAXMINMAX
DC Operating Voltage Range410.546.5V
Input Voltage RangeV
SS
V
DD
V
SS
V
DD
Functional Diagram
DAT A
BUS
CLOCK
CS
RA0
RA1
WR/
RD
WR
RD/
TPB
CLEAR
DAT A
BUS
BUFFER
ADDRESS
DECODE
AND
READ/
WRITE
LOGIC
SECTION
A
MODE
CONTROL
AND
STATUS
REGISTERS
A0
A1
A2
A3
A4
A5
A6
A7
READY
STROBE
UNITS
V
B0
B1
A INT
B
INT
INTERRUPT
MASKING
AND
LOGIC
SECTION
B
B2
B3
B4
B5
B6
B7
READY
STROBE
FIGURE 1. FUNCTIONAL DIAGRAM FOR CDP1851 AND CDP1851C
4-6
CDP1851, CDP1851C
Static Electrical Specifications At T
PARAMETER
Quiescent Device CurrentI
Output Low Drive
(Sink) Current
Output High Drive
(Source) Current
Output Voltage Low-Level
(Note 2)
Output Voltage High Level
(Note 2)
Input Low VoltageV
Input High VoltageV
Input Leakage CurrentI
Three-State Output Leakage
Current
Operating Current (Note 3)I
Input Capacitance C
Output CapacitanceC
NOTES:
1. Typical values are for TA = 25oC and nominal VDD.
2. IOL = IOH = 1µA
3. Operating current is measured at 200kHz for VDD = 5V and 400kHz for VDD = 10V, with open output (worst-case frequencies for
CDP1802A system operating at maximum speed of 3.2MHz).
I
I
V
V
I
OUT
DD1
DD
OL
OH
OL
OH
IL
lH
lN
IN
OUT
= -40oC to +85oC, VDD 5%, Unless Otherwise Specified
A
CONDITIONSLIMITS
CDP1851CDP1851C
V
V
O
(V)
-0, 55-0.0150-0.02200µA
-0, 1010-1200-- -µA
0.40, 551.63.2-1.63.2 -mA
0.50, 10102.65.2----mA
4.60, 55-1.15-2.3--1.15-2.3-mA
9.50, 1010-2.6-5.2- ---mA
-0, 55-00.1 -00.1V
-0, 1010-00.1 ---V
-0, 554.95-4.95-V
-0, 10109.910----V
0.5,
4.5
0.5,
9.5
0.5,
4.5
0.5,
9.5
Any
Input
0, 100, 1010--±1---µA
0, 1010--±2---µA
0, 50, 55--±1-- ±1µA
-0, 55-1.53-1.53mA
-0, 1010-612---mA
----57.5-57.5pF
----1015-1015pF
V
IN
(V)
0, 55--±1-- ±1µA
DD
(V)
MIN
-5--1.5--1.5V
-10--3---V
-53.5--3.5--V
-107-----V
(NOTE1)
TYPMAXMIN
(NOTE1)
TYPMAX
UNITS
Functional Description
The CDP1851 has four modes of operation: input, output,
bidirectional, and bit-programmable. Port A is programmable
in all modes; port B is programmable in all but the
bidirectional mode. A control byte must be loaded into the
control register to program the ports. In the input and output
modes, each port has two handshaking signals, STROBE
and RDY. In the bidirectional mode, port A has four
handshaking signals: A RDY and A STROBE for input, B
RDY and B STROBE for output. If port A is programmed in
the bidirectional mode, port B must be programmed in the
bit-programmable mode. Each terminal of port A or B may
be individually programmed for input or output in the bit-
programmable mode. Since handshaking is not used in this
mode, the RDY and STROBE lines may also be used for bitprogramming if port A is not in the bidirectional mode.
Input Mode
When a peripheral device has data to input, it sends a
STROBE pulse to the PlO. The leading edge of this pulse
clears the RDY line, inhibiting further transmission from the
peripheral. The trailing edge of the STROBE pulse latches the
data into the PlO buffer register and also activ ates the INT line
to signal the CPU to read this data. The lNT pin can be wired
to the INT pin of the CPU or the EF lines for polling. The CPU
4-7
CDP1851, CDP1851C
then executes an input or a load instruction, depending on the
mapping technique used. In either case the proper code must
be asserted on the RAO, RA1, and CS lines to read the buff er
register (see Table 6).
The
INT line is deactivated on the leading edge of TPB. The
trailing edge of TPB sets the RDY line to signal the peripheral that the port is ready to be loaded with new data. If RDY
is low when the input mode is entered (i.e. after a reset), a
“dummy” read must be done to set RDY high and signal the
peripheral device that the port is ready to be loaded.
Output Mode
A peripheral STROBE pulse sent to the PlO generates an
interrupt to signal the CPU that the peripheral device is
ready for data. The CPU executes the proper output or store
instruction. Data are then read from memory and placed on
the bus. The data are latched into the port buffer at the end
of the window when RE/
WE = 0 and WR/RE = 1. The RDY
line is also set at this time, indicating to the peripheral that
there is data in the port buffer. The
INT line is deactivated at
the beginning of the window. After the peripheral reads valid
port data, it can send another STROBE pulse, clearing the
RDY line and activating the
INT line as in the input mode.
Bidirectional Mode
This mode programs port A to function as both an input and
output port. The bidirectional feature allows the peripheral to
control port direction by using both sets of handshake signals.
The port A handshaking pins are used to control input data
from peripheral to PlO, while the port B handshaking pins are
used to control output data from PlO to peripheral. Data are
transferred in the same manner as the input and output
modes. Since A INT is used for both input and output, the status register must be read to determine what condition caused
A INT to be activated (see Table 5).
Bit-Programmable Mode
This mode allows individual bits of port A or port B to be
programmed as inputs or outputs. To output data to bits
programmed as outputs, the CPU loads a data byte into the
8-bit port as in the output mode (no handshaking). Only bits
programmed for outputs latch this data. Data must be stable
when reading from bits programmed as inputs, since the
input bits do not latch. When the CDP1851 inputs data to the
CPU the CPU also reads the output bits latched during the
last output cycle. The RDY and STROBE lines may be used
for I/O by using the STROBE/RDY I/O control byte in Table 2.
An additional feature available in the bit-programmable
mode is the ability to generate interrupts based on
input/output byte combinations. These interrupts can be
programmed to occur on logic conditions (AND, OR, NAND,
and NOR) generated by the eight I/O lines of each port (The
STROBE and RDY lines cannot generate interrupts).
CDP1800
FAMILY
µP
BUS 0-7
ADDRESS REGISTER
ADDRESSSELECTS
8001No. 1 Control/Status Reg
8002No. 1 Port A
8003No. 1 Port B
8004No. 2 Control/Status Reg
8008No. 2 Port A
800CNo. 2 Port B
TPB
MRD
MWR
TPA
A0
A1
A2
A3
A4
A5
A6
A7
INT
V
DD
10kΩ
TPB
RE
WR/
WE
RD/
CLOCK
RA0
RA1
CDP1851
CS
B INT
A INT
BUS 0-7
TPB
RE
WR/
WE
RD/
CLOCK
RA0
RA1
CS
A INT
B INT
CDP1851
PIO
NO. 1
PIO
NO. 2
A RDY
B RDY
A STROBE
B STROBE
PORT A0 - A7
PORT B0 - B7
A RDY
B RDY
A STROBE
B STROBE
PORT A0 - A7
PORT B0 - B7
FIGURE 2. MEMORY SPACE I/O . THIS CONFIGURATION ALLOWS UP T O FOUR CDP1851s T O OCCUPY MEMOR Y SPACE 8XXX WITH
NO ADDITIONAL HARDW ARE (A4-A5 AND A6-A7 ARE USED AS RA0 AND RA1 ON THE THIRD AND FOUR TH PIO’s)
4-8
CDP1851, CDP1851C
Programming
Initialization and Controls
The CDP1851 PlO must be cleared by a low on the
input during power-on to set it for programming. Once
programmed, modes can be changed without clearing
except when exiting the bit-programmable mode. A low on
the
CLEAR input sets both ports to the input modes,
disables interrupts, unmasks all bit-programmed interrupt
bits, and resets the status register, A RDY, and B RDY.
Mode Setting
The control register must be sequentially loaded with the
appropriate mode set control bytes in order as shown in Table
1 (i.e. input mode then output mode, etc.). Por t A is set with
the SET A bit = 1 and port B is set with the SET B bit = 1. If a
port is set to the bit-programmable mode, the bit-programming
control byte from Table 2 must be loaded. A bit is programmed
for output with the I/O bit = 1 and for input with the I/O bit = 0.
The STROBE and RDY lines may be programmed for input or
output with the STROBE/RDY control byte of Table 2. Input
CLEAR
data on the STROBE and RDY lines is detected by reading
the status register. When using the STROBE or RDY lines for
output, the control byte must be loaded ev ery time output data
is to be changed. To program logical conditions that will generate an interrupt, the interrupt control byte of Table 3 must be
loaded. An interrupt mask of the eight I/O lines may be loaded
next, if bit D4 (mask follows) of the interrupt control byte = 1.
The I/O lines are masked if the corresponding bit of the interrupt mask register is 1, otherwise it is monitored. Any combination of masked bits are permissible, except all bits masked
(mask = FF).
INT Enable Disable
To enable or disable the
INT line in all modes, the interrupt
ENABLE/DISABLE byte must be loaded (see Table 4). Interrupts can also be detected by reading the status register
(see Table 5). All interrupts should be disabled when
programming or false interrupts may occur. The
INT outputs
are open drain NMOS devices that allow wired O Ring (use
10K pull-up registers).
GENERATECLEAR PULSE
AT PIN 13
REPEAT FOR EACH
BIT-PROGRAMMABLE
PORT
REPEAT FOR EACH
BIT-PROGRAMMABLE
PORT
YES
PERFORM FOLLOWING
SEQUENCE BEFORE
PROGRAMMING PORT A TO
BIDIRECTIONAL MODE
SET BIT DIRECTION
USING TABLE 2
WILL
INTERRUPTS
BE USED FOR
BIT-PROGRAMMED
PORT?
YES
SET BIT LOGICAL
CONDITIONS AND
MASKING USING
TABLE 3
SET PORTS A AND B
TO INPUT, OUTPUT, OR
BIT-PROGRAMMABLE MODE
USING TABLE 1
IS
EITHER PORT
SET TO THE
BIT-PROGRAMMABLE
MODE 3
NOW SET PORT A TO
BIDIRECTIONAL MODE,
SET MASTER INTERRUPT
ENABLE/DISABLE
NO
MAIN PROGRAM
NO
IF DESIRED
USING TABLE 4
FIGURE 3. A FLOW CHART GUIDE TO CDP1851 MODE PROGRAMMING
NOTES:
1. STROBE/READY I/O Control Byte (Table 2) is also used to output data to STROBE and READY lines when bit-programmed.
2. Status register (Table 2) is used to input data from STROBE and READY lines when bit-programmed.
3. Interrupt status is also read from status register.
4-9
Loading...
+ 9 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.