SAB80C517-M16 SIEMENS [Siemens Semiconductor Group], SAB80C517-M16 Datasheet - Page 49

no-image

SAB80C517-M16

Manufacturer Part Number
SAB80C517-M16
Description
8-Bit CMOS Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
Table 7-2
Read-Modify-Write Instructions
Instruction
ANL
ORL
XRL
JBC
CPL
INC
DEC
DJNZ
MOV Px.y, C
CLR Px.y
SETB Px.y
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. lf 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 rather than the pin will return the correct value of "1".
Semiconductor Group
Function
Logic AND; e.g. ANL P1, A
Logic OR; e.g. ORL P2, A
Logic exclusive OR; e.g. XRL P3, A
Jump if bit is set and clear bit; e.g. JBC P1.1, LABEL
Complement bit; e.g. CPL P3.0
Increment byte; e.g. INC P4
Decrement byte; e.g. DEC P5
Decrement and jump if not zero; e.g. DJNZ P3, LABEL
Move carry bit to bit y of port x
Clear bit y of port x
Set bit y of port x
50
On-Chip Peripheral Components

Related parts for SAB80C517-M16