MOTOROLA
2-4
MC68HC05T16
PIN DESCRIPTIONS AND INPUT/OUTPUT PORTS
2
2.2
INPUT/OUTPUT PORTS
2.2.1
Input/Output Programming
Port A, B, C, E, and F may be programmed as an input or an output under software control. The
direction of the pins is determined by the state of corresponding bit in the port data direction
register (DDR). Each 8-bit port has an associated 8-bit data direction register. Any port A, B, C,
E, or F pin is configured as an output if its corresponding DDR bit is set to a logic one. A pin is
configured as an input if its corresponding DDR bit is cleared to a logic zero. At power-on or reset,
all DDRs are cleared, which configure all port A, B, C, E and F pins as inputs. The data direction
registers are capable of being written to or read by the processor. Refer to Figure 2-2 and
Table 2-1. During the programmed output state, a read of the data register actually reads the value
of the output data latch and not the I/O pin.
2.2.2
Port E and F Configuration Registers
Port E and F are shared with PWM, PAC, OSD, MBUS, and ADC. The configuration registers, at
$0C and $0D, are used to configure these I/O pins. The default state after a reset or POR is zero.
Setting the corresponding bits will enable the corresponding functions. For example, setting the
SDA and SCL bits will configure PF5 and PF6 as MBUS interface pins, regardless of the settings
in the port F Data Direction register.
Table 2-1 I/O Pin Functions
R/W
DDR
I/O Pin Function
0
0
The I/O pin is in input mode. Data is written into the output data latch.
0
1
Data is written into the output data latch and output to the I/O pin.
1
0
The state of the I/O pin is read.
1
1
The I/O pin is in an output mode. The output data latch is read.
Address
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
Port E Configuration Register
$0C
PWM7 PWM6 PWM5 PWM4 PWM3 PWM2 PWM1 PWM0 0000 0000
Address
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
Port F Configuration Register
$0D
PAC
SCL
SDA
ADC1 HTONE
I
PWM9 PWM8 0000 0000
TPG
22
Содержание MC68HC05T16
Страница 2: ......
Страница 14: ...MOTOROLA vi MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 12 ...
Страница 16: ...MOTOROLA viii MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 14 ...
Страница 18: ...MOTOROLA x MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 16 ...
Страница 26: ...MOTOROLA 2 6 MC68HC05T16 PIN DESCRIPTIONS AND INPUT OUTPUT PORTS 2 THIS PAGE LEFT BLANK INTENTIONALLY TPG 24 ...
Страница 54: ...MOTOROLA 5 12 MC68HC05T16 TIMERS 5 THIS PAGE LEFT BLANK INTENTIONALLY TPG 52 ...
Страница 64: ...MOTOROLA 6 10 MC68HC05T16 M BUS SERIAL INTERFACE 6 THIS PAGE LEFT BLANK INTENTIONALLY TPG 62 ...
Страница 92: ...MOTOROLA 10 4 MC68HC05T16 ANALOG TO DIGITAL CONVERTER 10 THIS PAGE LEFT BLANK INTENTIONALLY TPG 90 ...
Страница 106: ...MOTOROLA 11 14 MC68HC05L1 CPU CORE AND INSTRUCTION SET 11 THIS PAGE LEFT BLANK INTENTIONALLY TPG 104 ...
Страница 110: ...MOTOROLA 12 4 MC68HC05T16 LOW POWER MODES 12 THIS PAGE LEFT BLANK INTENTIONALLY TPG 108 ...
Страница 116: ...MOTOROLA 13 6 MC68HC05T16 OPERATING MODES 13 THIS PAGE LEFT BLANK INTENTIONALLY TPG 114 ...
Страница 122: ...MOTOROLA 14 6 MC68HC05T16 ELECTRICAL SPECIFICATIONS 14 THIS PAGE LEFT BLANK INTENTIONALLY TPG 120 ...
Страница 124: ...MOTOROLA 15 2 MC68HC05T16 MECHANICAL SPECIFICATIONS 15 THIS PAGE LEFT BLANK INTENTIONALLY TPG 122 ...
Страница 127: ...2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 ...