M38220E1-FP Datasheet

  • M38220E1-FP

  • SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER

  • 980.52KB

  • 78页

  • MITSUBISHI   MITSUBISHI

扫码查看芯片数据手册

上传产品规格书

PDF预览

MITSUBISHI MICROCOMPUTERS
3822 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
I/O PORTS
Direction Registers (ports P2, P4
1
-P4
7
, and
P5-P7)
The 3822 group has 49 programmable I/O pins arranged in seven
I/O ports (ports P0鈥揚2, P4
1
鈥揚4
7
and P5-P7). The I/O ports P2,
P4
1
鈥揚4
7
and P5-P7 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 in-
put port or output port.
When 鈥?鈥?is written to the bit corresponding to a pin, that pin be-
comes an input pin. When 鈥?鈥?is written to that bit, that pin be-
comes an output pin.
If data is read from a pin 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.
b7
b0
PULL register A
(PULLA: address 0016
16
)
P0
0
鈥揚0
7
pull-down
P1
0
鈥揚1
7
pull-down
P2
0
鈥揚2
7
pull-up
P3
4
鈥揚3
7
pull-down
P7
0
, P7
1
pull-up
Not used (return 鈥?鈥?when read)
b7
b0
PULL register B
(PULLB : address 0017
16
)
P4
1
鈥揚4
3
pull-up
P4
4
鈥揚4
7
pull-up
P5
0
鈥揚5
3
pull-up
P5
4
鈥揚5
7
pull-up
P6
0
鈥揚6
3
pull-up
P6
4
鈥揚6
7
pull-up
Not used (return 鈥?鈥?when read)
0: Disable
1: Enable
Direction Registers (ports P0 and P1)
Ports P0 and P1 have direction registers which determine the in-
put/output direction of each individual port.
Each port in a direction register corresponds to one port, each port
can be set to be input or output. When 鈥?鈥?is written to the bit 0 of
a direction register, that port becomes an input port. When 鈥?鈥?is
written to that port, that port becomes an output port. Bits 1 to 7 of
ports P0 and P1 direction registers are not used.
Note:
The contents of PULL register A and PULL register B
do not affect ports programmed as the output port.
Fig. 14 Structure of PULL register A and PULL register B
Ports P3 and P4
0
These ports are only for input.
Pull-up/Pull-down Control
By setting the PULL register A (address 0016
16
) or the PULL reg-
ister B (address 0017
16
), ports except for port P4
0
can control
either pull-down or pull-up (pins that are shared with the segment
output pins for LCD are pull-down; all other pins are pull-up) with
a program.
However, the contents of PULL register A and PULL register B do
not affect ports programmed as the output ports.
17

M38220E1-FP相关型号PDF文件下载

您可能感兴趣的PDF文件资料

热门IC型号推荐

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!