100
CHAPTER 4 I/O PORTS
MB89620 series
4.4 Port 3
4.4.1 Port 3 Registers (PDR3, DDR3)
This section describes the port 3 registers.
n
Port 3 Register Functions
l
Port 3 data register (PDR3)
The PDR3 register holds the pin states.
l
Port 3 data direction register (DDR3)
The DDR3 register sets the direction (input or output) for each pin (bit).
Setting “1” to the bit corresponding to a port (pin) sets the pin as an output port. Setting “0” sets
the pin as an input port.
Check:
As the DDR3 register is write-only, the bit manipulation instructions (SETB and CLRB) cannot be
used.
Notes:
• When using peripherals that have output pins, enabling a peripheral’s output enable bit, for a
particular pin, sets that pin as a peripheral output pin, regardless of the DDR3 register setting
value.
• When using peripherals that have input pins, set the DDR3 register bits corresponding to the
peripheral input pins to “0” to set the pins as input ports.
• Writing data to the PDR3 register for pins that have been set to the input direction does not output
to the pins. (However, the data is held in the output latch.) Also, the DDR3 register is initialized to
“0” by a reset.
Table 4.4.1 lists the functions of the port 3 registers.
R/W : Readable and writable
W : Write-only
X : Indeterminate
Table 4.4.1 Port 3 Register Function
Register
Data
Read
Write
Read/
Write
Address
Initial value
Port 3 data register
(PDR3)
0
Pin state is the “L”
level.
Sets “0” to the output
latch.
Outputs an “L” level to
the pin if the pin
functions as an output
port.
R/W
000C
H
XXXXXXXX
B
1
Pin state is the “H”
level.
Sets “1” to the output
latch.
Outputs an “H” level to
the pin if the pin
functions as an output
port.
Port 3 data direction
register (DDR3)
0
Reading is not
permitted (write-
only).
Sets the output buffer
“OFF” and sets the pin
as an input pin.
W
000D
H
00000000
B
1
Sets the output buffer
“ON” and sets the pin as
an output pin.
Содержание F2MC-8L MB89620 Series
Страница 8: ......
Страница 10: ...MB89620 series ...
Страница 11: ...vi MB89620 series ...
Страница 17: ...xii MB89620 series ...
Страница 18: ...xvi MB89620 series ...
Страница 30: ...MB89620 series CHAPTER 1 OVERVIEW 9 Memo ...
Страница 34: ...MB89620 series CHAPTER 1 OVERVIEW 13 Memo ...
Страница 42: ...MB89620 series CHAPTER 1 OVERVIEW 21 Memo ...
Страница 49: ...28 CHAPTER 1 OVERVIEW MB89620 series ...
Страница 62: ...MB89620 series CHAPTER 3 CPU 41 Memo ...
Страница 78: ...MB89620 series CHAPTER 3 CPU 57 Memo ...
Страница 82: ...MB89620 series CHAPTER 3 CPU 61 Memo ...
Страница 86: ...MB89620 series CHAPTER 3 CPU 65 Memo ...
Страница 90: ...MB89620 series CHAPTER 3 CPU 69 Memo ...
Страница 96: ...MB89620 series CHAPTER 3 CPU 75 Memo ...
Страница 122: ...MB89620 series CHAPTER 4 I O PORTS 101 Memo ...
Страница 144: ...MB89620 series CHAPTER 5 TIMEBASE TIMER 123 Memo ...
Страница 149: ...128 CHAPTER 5 TIMEBASE TIMER MB89620 series ...
Страница 157: ...136 CHAPTER 6 WATCHDOG TIMER MB89620 series ...
Страница 174: ...MB89620 series CHAPTER 7 8 BIT PWM TIMER 153 Memo ...
Страница 177: ...156 CHAPTER 7 8 BIT PWM TIMER MB89620 series ...
Страница 202: ...MB89620 series CHAPTER 9 16 BIT TIMER COUNTER 181 Memo ...
Страница 217: ...196 CHAPTER 9 16 BIT TIMER COUNTER MB89620 series ...
Страница 220: ...MB89620 series CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 199 Memo ...
Страница 228: ...MB89620 series CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 207 Memo ...
Страница 245: ...224 CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 MB89620 series ...
Страница 266: ...MB89620 series CHAPTER 13 A D CONVERTER 245 13 Memo ...
Страница 283: ...262 CHAPTER 13 A D CONVERTER MB89620 series ...
Страница 289: ...268 CHAPTER 14 CLOCK MONITOR FUNCTION MB89620 series ...
Страница 306: ...MB89620 series APPENDIX 285 APPEND Memo ...
Страница 319: ...298 APPENDIX MB89620 series Memo ...
Страница 321: ...2 ...
Страница 354: ......