EasyManuals Logo

Atmel 8051 User Manual

Atmel 8051
113 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #75 background imageLoading...
Page #75 background image
Common Features Description
Atmel 8051 Microcontrollers Hardware Manual 2-74
4316B–8051–02/04
up P2 to drive the transistor. Figure 2-6 shows an example where the port is driven by
an open drain transistor t
N
. The parasitic capacitance is equal to 1000pF.
Figure 2-6. Port Interfacing
The above diagram show the behavior of the port during 0 to 1 transition.
In the area A only pull-up P2 sinks the capacitor and takes 5 µs to switch from 0 volt to 2
volts. In the area B, pull-up P2 and P3 feed the capacitor and the time to charge the capacitor is
divide roughly by ten. So this figure shows it takes some machine cycles before having a true
high level during a 0-to-1 transition.
Figure 2-7. Port Behavior During 0-to-1 Transition
2.5.4 Read-Modify-Write
Feature
Some instructions that read a port read the latch and others read the pin. Which instruc-
tions perform what functions? The instructions that read the latch rather than the pin are
the ones that read a value, possibly change it, and then rewrite it to the latch. These are
called “read-modify-write” instructions. The instructions listed below are read-modify-
write instructions. When the destination operand is a port, or a port bit, these instruc-
tions read the latch rather than the pin:
ANL (logical AND, e.G., ANL P1,A)
ORL (logical OR, e.g., ORL P2,A)
XRL (logical EX-OR, e.g., XRL P3,A)
JBC (jump if bit = 1 and clear bit, e.g., JBC P1.1, LABEL)
CPL (complement bit, e.g., CPL P3.0)
INC (increment, e.g., INC P2)
DEC (decrement, e.g., DEC P2)
DJNZ (decrement and jump if not zero, e.g., DJNZ P3, LABEL)
MOV PX.Y,C(move carry bit to bit Y of Port X)
Voltage (V)

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel 8051 and is the answer not in the manual?

Atmel 8051 Specifications

General IconGeneral
BrandAtmel
Model8051
CategoryMicrocontrollers
LanguageEnglish

Related product manuals