View
112
Download
0
Category
Preview:
Citation preview
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
1
MikrocomputertechnikJürgen Walter
„Port-Befehls-Quickie“8051-Port Befehle
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
2
Lernziele:
· Schreiben eines Port-Bits?· Lesen Port-Bits?· Speichern eines Port-Bits?· Verschieben eines Port-Bits?
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
3
Voraussetzungen
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
4
Wozu dient ein Port?
T1
- Ta
ster
1
T3
- Ta
ster
3
T2
- Ta
ster
2
L3 -
LE
D 3
L2 -
LE
D 2
Controller C8051F340
L1 -
LE
D 1
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
5
Port–Eingang „0“ und „1“-Pegel – 8051 Assembler Befehle
Eingang
+ Vcc
GND
R = ca. 50 kΩ
Im Controller Peripherie
Port 1.1
jnb P1.1,MARKE_1jb P1.1,MARKE_2
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
6
Port–Eingang „0“ und „1“-Pegel – 8051 Assembler Befehle
Eingang
+ Vcc
GND
R = ca. 50 kΩ
Im Controller Peripherie
Port 1.1
mov C,P1.1
QuelleZiel
Befehl
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
7
Port–Ausgang mit Leuchtdiode
Ausgang
+ Vcc
GND
R = 50 kΩ
Im Controller Peripherie
P3.2
clr P3.2
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
8
Port–Ausgang mit Leuchtdiode
Ausgang
+ Vcc
GND
R = 50 kΩ
Im Controller Peripherie
P3.2
setb P3.2
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
9
Port–Ausgang mit Leuchtdiode – C = „0“
Ausgang
+ Vcc
GND
R = 50 kΩ
Im Controller Peripherie
P3.2
mov P3.2,C
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
10
Port–Ausgang mit Leuchtdiode – C =„1“
Ausgang
+ Vcc
GND
R = 50 kΩ
Im Controller Peripherie
P3.2
mov C,P3.2
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
11
Übung: Port
· Erstellen Sie aus dem Schaltplan des VC_2 Controllers die Tabellen:Eingang Port Anschluss
IN P1.1 T1
IN
IN
Ausgang Port Anschluss
OUT
OUT
OUT
Mik
rocom
pu
tert
ech
nik
Port
-Befe
hls
-Qu
ickie
Pro
f. J
. W
alt
er
Sta
nd
Jan
uar
20
15
12
Quickies – schnell und intensiv lernen
· Ziel erreicht!
Recommended