psd511b1 STMicroelectronics, psd511b1 Datasheet - Page 45

no-image

psd511b1

Manufacturer Part Number
psd511b1
Description
Low Cost Field Programmable Microcontroller Peripherals
Manufacturer
STMicroelectronics
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
psd511b1-A-12J
Manufacturer:
HOLTEK
Quantity:
789
Part Number:
psd511b1-C-12J
Manufacturer:
WSI
Quantity:
108
Part Number:
psd511b1-C-12J
Manufacturer:
TEXAS
Quantity:
38
I/O Ports
(Cont.)
42
PSD5XX Family
Table 14.
Table 12. Port Configuration Registers (PCR)
Table 13. Port Data Registers (PDR)
9.3.10 Port Registers
There are two sets of registers per I/O port: the Port Configuration Registers (PCR) which
consist of four 8-bit registers; and the Port Data Registers (PDR) which include three 8-bit
registers. The PCR is used for setting up the port configuration, while the PDR enables the
microcontroller to write or read port data or status bits. Tables 12 and 13 show the names
and the registers and the ports to which they belong.
All the registers in the PCR and PDR are 8-bits wide and each bit is associated with a pin in
the I/O port. In Table 14, the LSB of the Data In Register of Port A is connected to pin PA0,
and the MSB is connected to PA7. This pin configuration also applies to other registers and
ports. For example, in the Direction Register of Port A, writing a hex value of 07 to the
register configures pins PA0 – PA2 as output pins, while PA3 – PA7 remain as input pins.
Registers can be accessed by the microcontroller during normal read/write bus cycles.
The I/O address offset of the registers are listed in the System Configuration section.
Data In Register – Port A
Direction Register – Port A
( Example: Pins PA0 – PA2 as Output, PA3 – PA7 as Input)
PA7 Pin
PA7 Pin
Bit 7
Bit 7
= 0
Data In Register
Data Out Register
Macrocell Out Register
Control Register
Direction Register
Open Drain Register
Special Function Register
PLD – I/O Register
Register Name
Register Name
PA6 Pin
PA6 Pin
Bit 6
Bit 6
= 0
PA5 Pin
PA5 Pin
Bit 5
Bit 5
= 0
PA4 Pin
PA4 Pin
Bit 4
Bit 4
= 0
A,B,C,D,E
A,B,C,D,E
A,B,E
A,B,C,D,E
A,B,C,D,E
C,D
A,B,E
A,B,E
PA3 Pin
PA3 Pin
Port
Port
Bit 3
Bit 3
= 0
PA2 Pin
PA2 Pin
Bit 2
Bit 2
= 1
PA1 Pin
PA1 Pin
Write/Read
Read/Write
Read
Write/Read
Read
Bit 1
Bit 1
Write/Read
Write/Read
Write/Read
Write/Read
Read
= 1
PA0 Pin
PA0 Pin
Bit 0
Bit 0
= 1

Related parts for psd511b1