sh6631a SinoWealth Micro-Electronics Corp. Ltd, sh6631a Datasheet - Page 7

no-image

sh6631a

Manufacturer Part Number
sh6631a
Description
Mask 4-bit Microcontroller
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
5. I/O PORT
The SH6631A provides 14 I/O pins. Each I/O pin contains pull-up MOS controllable by the program. When every I/O is used as
an input port, the port control register (PCR) controls ON/OFF of the output buffer. Sections below show the circuit configuration
of I/O ports.
PORTA, PORTB, PORTC and PORTD
Each of these ports contains 4 bit I/O pins (PortD contains 2 bit I/O pins). ON/OFF of the output buffer for port can be controlled
by the port control register (PCRA, PCRB, PCRC and PCRD) . Port I/O mapping address is shown as follows:
- The following is the circuit configuration diagram:
Port I/O Control Register:
I/O control register: PAXOUT, PBXOUT, PCXOUT, (X = 0, 1, 2, 3) PD1OUT, PD0OUT
Controlling the pull-up MOS
These ports contain pull-up MOS controlled by the program. Bit3 of the PMOD register controls On/Off of all pull-up MOS
simultaneously. Pull-up MOS is controlled by the port data registers (PA, PB, PC, and PD) of each port also. Thus, the pull-up
MOS can be turned on and off individually.
Port Function Control ( PMOD ) is below:
PPULL
Address
Address
$16
$17
$18
$19
$13
1: Set I/O as an output buffer.
0: Set I/O as an input buffer (power-on initial).
Address
$0A
$0B
$08
$09
Port Pull-up MOS enables control
0 = Disable PORT pull-up MOS (power-on initialization)
1 = Enable PORT pull-up MOS
PA3OUT
PB3OUT
PC3OUT
PPULL
Bit 3
Bit3
-
PA2OUT
PB2OUT
PC2OUT
PORT C.3
PORT A.3
PORT B.3
Bit 2
CPS
Bit2
-
Bit3
-
Figure. 3 Port Configuration Function Block Diagram
PULL-UP
DATA INPUT
REGISTER
CONTROL
REGISTER
PORT
PORT
PA1OUT
PB1OUT
PC1OUT
PD1OUT
DATA
Bit 1
Bit1
CF1
PORT A.2
PORT B.2
PORT C.2
Bit2
-
PC0OUT
PD0OUT
PA0OUT
PB0OUT
Bit 0
Bit0
CF0
7
PORT C.1
PORT D.1
PORT A.1
PORT B.1
RD_INPUT
Bit1
VCC
R/W
R/W
W
W
W
W
W
PULL-UP
PMOS
PORT A.0
PORT B.0
PORT C.0
PORT D.0
Bit3: Port Pull-up MOS Control
Bit0
Set PORTC as output port
Set PORTD as output port
Set PORTA as output port
Set PORTB as output port
Remarks
Remarks
R/W
R/W
R/W
R/W
R/W
SH6631A

Related parts for sh6631a