Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

ST6391 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
MFG CO.
'ST6391' PDF : 68 Pages View PDF
ST6391,92,93,95,97,99
INPUT/OUTPUT PORTS (Continued)
Table 8. I/O Port Options Selection
DDR DR
Mode
Option
0
0
In put
With on-chip pull-up
resistor
0
1
In put
Without on-chip pull-up resistor
1
X
Output
Open-drain or Push-Pull
Note: X: Means don’t care.
Figure 28. Port A, B, C Data Register
DRA, DRB, DRC
Port A, B, C Data Register
( C0h PA, C1h PB, C2h PC Read/ Write )
D7 D6 D5 D4 D3 D2 D1 D0
A0 - PA7 = Data Bits
PB0 - PB7 = Data Bits
PC0 - PC7 = Data Bits
PA7-PA0. These are the I/O port A data bits. Reset
at power-on.
PB7-PB0.These are the I/O port B data bits. Reset
at power-on.
PC7-PC0. Set to 04h at power-on. Bit 2 (PC2 pin)
is set to one (open drain therefore high im-
pedence).
I/O Pin Programming
Each pin can be individually programmed as input or
output with different input and output configurations.
This is achieved by writing to the relevant bit in the
data (DR) and data direction register (DDR). Table
8 shows all the port configurations that can be se-
lected by the user software.
Figure 29. Port A, B, C Data Register
DDRA, DDRB,DDRC
Port A, B, C Data Direction Register
( C4h PA, C5h PB, C6h PC Read/ Write )
D7 D6 D5 D4 D3 D2 D1 D0
PA0 - PA7 = Data Direction Bits
PB0 - PB7 = Data Direction Bits
PC0 - PC7 = Data Direction Bits
“0” Defines bit as Inpu t
”1” Defines bit as Outpu t
PA7-PA0. These are the I/O port A data direction
bits. When a bit is cleared to zero the related I/O
line is in input mode, if bit is set to one the related
I/O line is in output mode. Reset at power-on.
PB7-PB0. These are the I/O port B data direction
bits. When a bit is cleared to zero the related I/O
line is in input mode, if bit is set to one the related
I/O line is in output mode. Reset at power-on.
PC7-PC0. These are the I/O port C data direction
bits. When a bit is cleared to zero the related I/O
line is in input mode, if bit is set to one the related
I/O line is in output mode. Set to 04h at power-on.
Bit 2 (PC2 pin) is set to one (output mode se-
lected).
26/64
®
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]