MITSUBISHI MICROCOMPUTERS
4238 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTERS
12
I/O PORTS
(1) Port D (D0 – D7)
Port D is an output port for key scan output of key matrix. Its out-
put has a latch which is capable of manipulating 1-bit, and the
output can be carried out such that register Y of the data pointer
specifies one of the port D. The CLD instruction can be used to
set all of port D latches to “1”. The output structure is N-channel
open-drain.
Port D outputs “L” level at reset or standby state or RAM back-
up state.
When the system is returned from standby state or RAM back-
up state or enters reset, port D is placed in high-impedance
state.
(2) Port E
Port E is an I/O port for an extended system. Each pin of port E
has an independent I/O function. Port E is used as an input port,
and input data from port E is transferred to the bit 0 (A0) of regis-
ter A with the IAE instruction. Port E is used as an output port,
and the contents of the bit 3 (A3) of register A is output to port E
with the OEA instruction. The output structure is N-channel open-
drain.
Port E has a pull-up function only when it is used as an input
port.
Port E is placed in high-impedance state at reset. When the
system is released from reset, port E is the input port with the
pull-up function.
The state of port E at standby and RAM back-up can be set by
software. Port E is placed in high-impedance state with the
RKW instruction. It is also used as an input port which has a
pull-up function with the SKW instruction. When it is used as an
input port, system returns from standby or RAM back-up by in-
putting “L” level and has a key-on wakeup function to start os-
cillating in the oscillation circuit. Also, port E is used as the input
port with the pull-up function when system is returned from
standby state and RAM back-up state.
When port E is used as an input port again after it is used as an
output port, execute the IAE instruction after the SPUE instruc-
tion is executed. Port E is pull-up again with the SPUE instruc-
tion and the output buffer is turned off.
(3) Port G (G0 – G3)
Port G is an I/O port for key input of key matrix, and has a 4-bit I/
O function. Port G is used as an input port, and input data from
port G is transferred to register A with the IAG instruction. Port G
is used as an output port and the contents of register A is output
to port G with the OGA instruction. The output structure is N-
channel open-drain.
Port G has a pull-up function when it is used as an input/output
port.
Port G is the input port with the pull-up function at reset.
Port G is the input port with the pull-up function at standby state
or RAM back-up state. When “L” level signal is input to port G,
the system is returned from standby state and RAM back-up
state, and the oscillator circuit starts oscillating (key-on wakeup
function).
(4) Port CARR
Port CARR is a 1-bit port to output carrier wave for the remote
control transmitter. When the contents of port CARR output latch
is “1”, port CARR outputs the waveform selected by the carrier
wave select register C. When the contents of port CARR output
latch is “0”, port CARR outputs “L” level. Set the port CARR out-
put latch through the bit 3 (A3) of register A with the OCRA in-
struction. The output structure is CMOS output.
When the system enters the reset or standby state or RAM
back-up state, port CARR outputs “L” level.