English
Language : 

MG69L340 Datasheet, PDF (20/28 Pages) Megawin Technology Co., Ltd – Single Chip 8-bit CPU
MG69L340 Datasheet
Version 1.0
12 Configurable I/O Ports
12.1 Port 0
Port 0 Pad
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R W
00F1H
P0pad
P07 P06 P05 P04 P03 P02 P01 P00  -
Port 0 is combined with 4-bit input port and 4-bit I/O port. P0.4~P0.7 can be programmed as input or output
individually. When P0.n is configured as an output pin, the P0.n pin would output the logic content of P0obuf.n.
When the P0.n is configured as output mode, reading P0pad.n would always read logic ‘0’.
When the P0.n is configured as input mode, reading P0pad.n would always read the logic value from pad.
※ Bit-manipulation instructions are not available on this register.
Port 0 Output Buffer
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R W
00F0H
P0obuf
P07 P06 P05 P04
-
-
-
-
-
This register is used to buffer the output value of P0.4 ~ P0.7 and it is write-only.
※ Bit-manipulation instructions are not available on this register.
Port 0 Direction Register
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R W
00F2H
P0dir
DR7 DR6 DR5 DR4
-
-
-
-
-
P0dir.n = 0: P0.n is configured as an input pin. (Default)
1: P0.n is configured as an output pin.
※ Bit-manipulation instructions are not available on this register.
Port 0 Pull-high Control Register
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R W
00F4H
P0plh
PH7 PH6 PH5 PH4
-
-
-
-
-
0: Disable internal pull-high, 1: Enable internal pull-high
PH0 ~ PH3: Pull-high is always enabled.
PH4 ~ PH7: These control bits are used to enable the pull-high of P0.4 ~ P0.7 pin.
Note: When P0.n is configured as an output pin, the pull high will be disabled.
※ Bit-manipulation instructions are not available on this register.
Port 0 Open-Drain Control Register
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1
00F3H
P0opd
OD7 OD6 OD5 OD4
-
-
-
0: Disable open-drain output (CMOS output), 1: Enable open-drain output
Bit 0 R W
-
-
OD4 ~ OD7: These control bits are used to enable the open-drain of P0.4 ~ P0.7 pin.
※ Bit-manipulation instructions are not available on this register.
This document information is the intellectual property of Megawin Technology.
 Megawin Technology Co., Ltd. 2011 All right reserved.
QP-7300-03D
20/28