English
Language : 

M38503M4H Datasheet, PDF (13/51 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
3850 Group (Spec. H)
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
I/O PORTS
The I/O ports have direction registers which determine the input/
output direction of each individual pin. Each bit in a direction
register corresponds to one pin, and each pin can be set to be
input port or output port.
When “0” is written to the bit corresponding to a pin, that pin
becomes an input pin. When “1” is written to that bit, that pin
becomes an output pin.
If data is read from a pin which is set to output, the value of the
port output latch is read, not the value of the pin itself. Pins set to
input are floating. If a pin set to input is written to, only the port
output latch is written to and the pin remains floating.
Table 5 I/O port function
Pin
Name
P00/SIN2
P01/SOUT2
P02/SCLK2
Port P0
P03/SRDY2
P04–P07
P10–P17
P20/XCOUT
P21/XCIN
Port P1
P22
P23
Port P2
P24/RxD
P25/TxD
Input/Output
I/O Structure
CMOS compatible
input level
CMOS 3-state output
Input/output,
individual
bits
CMOS compatible
input level
N-channel open-drain
output
Non-Port Function
Related SFRs
Serial I/O2 function I/O
Serial I/O2 control
register
Sub-clock generating
circuit
CPU mode register
Serial I/O1 function I/O Serial I/O1 control
register
Ref.No.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
P26/SCLK
P27/CNTR0/SRDY1
P30/AN0–
P34/AN4
P40/CNTR1
P41/INT0
P42/INT1
P43/INT2/SCMP2
Port P3
Port P4
P44/INT3/PWM
Serial I/O1 function I/O Serial I/O1 control
(11)
register
CMOS compatible
input level
Serial I/O1 function I/O Serial I/O1 control
register
(12)
Timer X function I/O
Timer XY mode register
CMOS 3-state output
A-D conversion input
A-D control register
(13)
Timer Y function I/O
Timer XY mode register
(14)
External interrupt input
Interrupt edge selection
register
(15)
External interrupt input
SCMP2 output
External interrupt input
PWM output
Interrupt edge selection
register
(16)
Serial I/O2 control register
Interrupt edge selection
register
(17)
PWM control register
13