English
Language : 

UPSD3212A Datasheet, PDF (117/163 Pages) STMicroelectronics – Flash Programmable System Devices with 8032 MCU with USB and Programmable Logic
uPSD3212A, uPSD3212C, uPSD3212CV
Port Data Registers
The Port Data Registers, shown in Table 97, are
used by the MCU to write data to or read data from
the ports. Table 97 shows the register name, the
ports having each register type, and MCU access
for each register type. The registers are described
below.
Data In. Port pins are connected directly to the
Data In buffer. In MCU I/O Input Mode, the pin in-
put is read through the Data In buffer.
Data Out Register. Stores output data written by
the MCU in the MCU I/O Output Mode. The con-
tents of the Register are driven out to the pins if the
Direction Register or the output enable product
term is set to '1.' The contents of the register can
also be read back by the MCU.
Output Macrocells (OMC). The CPLD Output
Macrocells (OMC) occupy a location in the MCU’s
address space. The MCU can read the output of
the Output Macrocells (OMC). If the OMC Mask
Register Bits are not set, writing to the macrocell
loads data to the macrocell flip-flops. See
PLDs, page 106.
OMC Mask Register. Each OMC Mask Register
Bit corresponds to an Output Macrocell (OMC) flip-
flop. When the OMC Mask Register Bit is set to a
'1,' loading data into the Output Macrocell (OMC)
flip-flop is blocked. The default value is '0' or un-
blocked.
Input Macrocells (IMC). The Input Macrocells
(IMC) can be used to latch or store external inputs.
The outputs of the Input Macrocells (IMC) are rout-
ed to the PLD input bus, and can be read by the
MCU. See PLDs, page 106.
Enable Out. The Enable Out register can be read
by the MCU. It contains the output enable values
for a given port. A '1' indicates the driver is in out-
put mode. A '0' indicates the driver is in tri-state
and the pin is in input mode.
Table 96. Drive Register Pin Assignment
Drive
Register
Bit 7
Bit 6
Bit 5
Port A
Open
Drain
Open
Drain
Open
Drain
Port B
Open
Drain
Open
Drain
Open
Drain
Port C
Open
Drain
NA(1)
NA(1)
Port D
NA(1)
NA(1)
NA(1)
Note: 1. NA = Not Applicable.
Bit 4
Open
Drain
Open
Drain
Open
Drain
NA(1)
Bit 3
Slew
Rate
Slew
Rate
Open
Drain
NA(1)
Bit 2
Slew
Rate
Slew
Rate
Open
Drain
Slew
Rate
Bit 1
Slew
Rate
Slew
Rate
NA(1)
Slew
Rate
Bit 0
Slew
Rate
Slew
Rate
NA(1)
NA(1)
Table 97. Port Data Registers
Register Name
Port
Data In
A,B,C,D
Data Out
A,B,C,D
Output Macrocell
A,B,C
Mask Macrocell
Input Macrocell
Enable Out
A,B,C
A,B,C
A,B,C
MCU Access
READ – input on pin
WRITE/READ
READ – outputs of macrocells
WRITE – loading macrocells flip-flop
WRITE/READ – prevents loading into a given
macrocell
READ – outputs of the Input Macrocells
READ – the output enable control of the port driver
117/163