
SDA 525x
Semiconductor Group
79
1998-04-08
source current when externally pulled low (for details see
Chapter “DC-
Characteristics” on page 129
).
In ports P1, P3 and P4 the output drivers provide source current for one oscillator period
if, and only if, software updates the bit in the output latch from a “zero” to an “one”.
Sourcing current only on “zero to one” transition prevents a pin, programmed as an input,
from sourcing current into the external device that is driving the input pin.
Secondary functions can be selected individually and independently for the pins of port
1 and 3. Further information on port 1's secondary functions is given in
Chapter “Pulse
Width Modulation Unit (PWM)” on page 106
. P3 generates the secondary control
signals automatically as long as the pin corresponding to the appropriate signal is
programmed as an input, i. e. if the corresponding bit latch in the P3 special function
register contains a “one”.
The following alternate functions can be selected when using the corresponding P3 pins:
P3.0
ODD/EVEN
(ODD/EVEN-indicator output)
P3.2
INT0
(external interrupt 0)
P3.3
INT1
(external interrupt 1)
P3.4
T0
(Timer/Counter 0 external input)
P3.5
T1
(Timer/Counter 1 external input)
P3.6
RXD
(serial port receive line)
P3.7
TXD
(serial port transmit line)
Read Modify-Write Feature
“Read-modify-write” commands are instructions that read a value, possibly change it,
and then rewrite it to the latch. When the destination operand is a port or a port bit, these
instructions read the latch rather than the pin. The read-modify-write instructions are
listed in
Table 20
.
The read-modify-write instructions are directed to the latch rather than the pin in order to
avoid a possible misinterpretation of the voltage level at the pin. For example, a port bit
might be used to drive the base of a transistor. When a “one” is written to the bit, the
transistor is turned on.
If the CPU then reads the same port bit at the pin rather than the latch, it will read the
base voltage of the transistor and interpret it as a 0. Reading the latch rather than the
pin will return the correct value of “one”.