DatasheetQ Logo
Electronic component search and free download site.
Transistors,MosFET ,Diode,Integrated circuits

ZPSD503B1-C-90JI View Datasheet(PDF) - STMicroelectronics

Part Name
Description
Manufacturer
ZPSD503B1-C-90JI Datasheet PDF : 153 Pages
First Prev 41 42 43 44 45 46 47 48 49 50 Next Last
PSD5XX Family
I/O Ports
(Cont.)
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.
Table 12. Port Configuration Registers (PCR)
Register Name
Control Register
Direction Register
Open Drain Register
Special Function Register
PLD – I/O Register
Port
A,B,C,D,E
A,B,C,D,E
C,D
A,B,E
A,B,E
Write / Read
Write/Read
Write/Read
Write/Read
Write/Read
Read
Table 13. Port Data Registers (PDR)
Register Name
Data In Register
Data Out Register
Macrocell Out Register
Port
A,B,C,D,E
A,B,C,D,E
A,B,E
Read / Write
Read
Write/Read
Read
Table 14.
Data In Register – Port A
Bit 7
Bit 6
Bit 5
PA7 Pin PA6 Pin PA5 Pin
Bit 4
PA4 Pin
Bit 3
PA3 Pin
Bit 2
PA2 Pin
Bit 1
Bit 0
PA1 Pin PA0 Pin
Direction Register – Port A
( Example: Pins PA0 – PA2 as Output, PA3 – PA7 as Input)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
PA7 Pin PA6 Pin PA5 Pin PA4 Pin PA3 Pin PA2 Pin PA1 Pin PA0 Pin
=0
=0
=0
=0
=0
=1
=1
=1
42
 

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]