English
Language : 

C509-L_97 Datasheet, PDF (96/290 Pages) Siemens Semiconductor Group – 8-Bit CMOS Microcontroller
On-Chip Peripheral Components
C509-L
The reason why read-modify-write instructions are directed to the latch rather than the pin is 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 “1” 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 (approx. 0.7 V, i.e. a logic low level!) and interpret it as “0”. For example, when modifying
a port bit by a SETB or CLR instruction, another bit in this port with the above mentioned
configuration might be changed if the value read from the pin were written back to the latch.
However, reading the latch rater than the pin will return the correct value of “1”.
Semiconductor Group
6-18
1997-10-01