DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

MC80F0804D View Datasheet(PDF) - Unspecified

Part Name
Description
Manufacturer
MC80F0804D
Unspecified
Unspecified 
MC80F0804D Datasheet PDF : 120 Pages
First Prev 41 42 43 44 45 46 47 48 49 50 Next Last
MC80F0704/0708/0804/0808
9. I/O PORTS
The MC80F0704/0708/0804/0808 has three ports (R0, R1 and
R3). These ports pins may be multiplexed with an alternate func-
tion for the peripheral features on the device. All port can drive
maximum 20mA of high current in output low state, so it can di-
rectly drive LED device.
All pins have data direction registers which can define these ports
as output or input. A “1” in the port direction register configure
the corresponding port pin as output. Conversely, write “0” to the
corresponding bit to specify it as input pin. For example, to use
the even numbered bit of R0 as output ports and the odd num-
bered bits as input ports, write “55H” to address 0C1H (R0 port
direction register) during initial setting as shown in Figure 9-1 .
All the port direction registers in the MC80F0704/0708/0804/
0808 have 0 written to them by reset function. On the other hand,
its initial status is input.
9.1 R0 and R0IO register
R0 is an 8-bit CMOS bidirectional I/O port (address 0C0H). Each
I/O pin can independently used as an input or an output through
the R0IO register (address 0C1H). When R00 through R07 pins
are used as input ports, an on-chip pull-up resistor can be connect-
WRITE “55H” TO PORT R0 DIRECTION REGISTER
0C0H
0C1H
0C2H
0C3H
R0 data
R0 direction
R1 data
R1 direction
0 1 0 1 0 1 0 1 BIT
76543210
I O I O I O I O PORT
76543210
I: INPUT PORT
O: OUTPUT PORT
Figure 9-1 Example of port I/O assignment
ed to them in 1-bit units with a pull-up selection register 0 (PU0).
Each I/O pin of R0 port can be used to open drain output port by
setting the corresponding bit of the open drain selection register
0 (R0OD).
R0 Data Register
ADDRESS: 0C0H
RESET VALUE: 00H
R0
R07 R06 R05 R04 R03 R02 R01 R00
ADDRESS: 0F8H
RESET VALUE: 0000 0000B
PSR0 PWM3OE PWM1OE EC1E EC0E INT3E INT2E INT1E INT0E
R0 Direction Register
R0IO
Input / Output data
ADDRESS: 0C1H
RESET VALUE: 00H
R0 Pull-up
Selection Register
PU0
Port Direction
0: Input
1: Output
ADDRESS: 0FCH
RESET VALUE: 00H
R0 Open Drain
Selection Register
R0OD
Pull-up Resister Selection
0: Disable
1: Enable
ADDRESS: 0C8H
RESET VALUE: 00H
Open Drain Resister Selection
0: Disable
1: Enable
Port / INT Selection
0: R11, R12, R03, R00
1: INT0, INT1,INT2, INT3
Port / EC Selection
0: R04, R07
1: EC0, EC1
Port / PWM Selection
0: R10, R11
1: PWM1O, PWM3O
ADDRESS: 0F9H
RESET VALUE: ---- 0000B
PSR1 -
-
-
- AVREFS BUZOE T2OE T0OE
Port / TO Selection
0: R04, R07
1: EC0, EC1
R12/BUZO Selection
0: R12 port (Turn off buzzer)
1: BUZO port (Turn on buzzer)
R10 / AVREF Selection
0: R10 port
1: AVREF port
Figure 9-2 R0 Port Register
In addition, Port R0 is multiplexed with various alternate func-
tions. The port selection register PSR0 (address 0F8H) and PSR1
(address 0F9H) control the selection of alternate functions such as
external interrupt 3 (INT3), external interrupt 2 (INT2), event
counter input 0 (EC0), timer 0 output (T0O), timer 2 output
(T2O) and event counter input 1 (EC1). When the alternate func-
38
October 31, 2011 Ver 1.03

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]