SFR
· Special Function Register
· Im direkt adressierbarer Bereich 80h…FFh
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0091.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
FT_WS0=
7_P08
· T1à beschreiben den internen Datenspei=
cher
mit 0A5h von Adresse 80h bis FFh
· T2à beschreiben den internen
Datenspeicher mit 5Ah von Adresse 80h bis FFh
· Erkenntnis: Von 80h bis=
FFh
sind die Speicherzellen unterschiedlich: direkt und indirekt
adressierbare
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0092.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
24.10.=
2007
· Indirekte – direkte Adressierung
· Ab 80h…ffh indirekte Adressierung à internen indirekt
adressierbaren Speicherbereich
· Ab 80h…ffh
direkte Adressierung à SFR
· FT_WS07_P07 / 8 – Programme ;-)
· Adressen – Namen REG535=
.PDF
Hardwarespezifikation des Controllers
· P1 - Port =
1.1
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0093.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0094.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0095.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Wünsch=
e
· Progammierübungen – Klausuren – Lösungen
· Mit der Platine arbeiten
· ;-)
· Kleine Platinen zum Test à Elektrotechniklabor
· Raum neben Elektrotechnik-Labor
· Doppelprojektion
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0096.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Mechat=
ronik-Award
· 7.11.07 14=
h bis
8.11.07 20h30
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0097.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0098.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Ziele<=
/div>
· A/D-Wandlung
· D/A-Wandlung
· Blinklicht
· PWM Servomotor ansteuern
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0099.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0100.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
WS07_F=
T_P09
· Zwei Temperatursensoren
werden in einem Raum angebracht – der Mittelwert der bei=
den
Sensoren soll angezeigt werden. (Ergebnis im Akku)
· Wert an AN0 einlesen à in R1 schreiben
· Wert an AN1 einlesen à in Akku
· Summe aus Akku und R1
· Ergebnis in Akku
· Links shiften 1 Mal
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0101.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Jb BSY=
,$
· MARKE:
· Jb BSY,MARKE
· AN0_COD
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0102.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
29.
Oktober 2007
· Herzliches Grüß Gott!
· Messbereich A/D-Wandler
· Mov DAPR,#bbbb bbbbB ;
stellt den Messbereich ein
· Beispiel: Messbereich: 1,25V – 2,5 V
· Mov DAPR,#1000 0100B
· Vorsicht: der Messberei=
ch
muss immer größer 1V sein
· Vorsicht: V AREF und V A=
GND anschließen
· MORGEN: Bitte Karte + Buch mitbringen
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0103.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
AN0_CO=
D
· Bitte im Simulator testen.
· AIN0=3D3,5V
· AIN0=3D5,0V
· AIN0=3D0,0V
· Idee: Subtrahiere
Spannungsbereich à
Carry-Bit überwachen ~ Ergebnis kleiner 0 à Carry wird <=
/span>gesetzt.
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0104.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Interr=
upt
· Unterbrechung
· Voraussetzungen:
· Allgemeine Interrupt ist freigegeben
· Spezielle Interrupt ist freigegeben
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0105.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
WS07_F=
T_P10
Interrupt
· Taste T2 abfragen
· Lö=
sen
Sie an Port 3 einen externen Interrupt aus à ISR_AD A/D-Wandlung zwischen 0..5=
V à Ergebnis
in R4
· Voraussetzungen:
=
span>
· Po=
rt 3
- /Int0 – Schaltplan – Datenblatt=
–
Suchen Sie den PIN! PIN 23 am Controller – VG-Leiste –=
C19 – P3.2 - EXTIO
· Interrupt-Vekt=
or
Buch S. 115 /INT0: 0003h – Programmspeicher
· In=
terrupt
freigeben spezielle Interruptfreigabe + allgemeine Interruptfrei=
gabe
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0106.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Priori=
ty
Level
· Priorität – Beispiel: Eigene Interrupt-Bearbeitung&=
#13;
· 1. Beispiel Nur 1 Interrupt ohne Prioritätseinstell=
ung
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0107.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
IEN0=
div>
· In=
terruptregister
– in jedem Programm mit Interrupts
· EAL – Allgemeine
Interruptfreigabe
· EX0 für externen
Interrupt
· Vorgehensweise beim
Programmieren:
· ORG 03h: ISR0
Interrupt Service Routine
<=
/div>
<=
span
style=3D'font-size:75%'>·=
Call ISR0
<=
span
style=3D'font-size:75%'>·=
reti
· INIT: à setb EAL, se=
tb
EX0
· SCHLEIFE:
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0108.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
TCON=
div>
· Anzeige, ob Interrupt aufgetreten ist?
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0109.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Vorgeh=
ensweise
· Interrupt-Vektor
· Buch Seite 115
· /INT0 à Externer Int=
errupt
0 – 03H à Das Programm
wird ab 03h im Programmspeicher ausgeführt
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0110.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Hardwa=
re
EURO_535
· Netzteil 5 V - 250mA
· V24-Kabel weibl. – weibl.
· USB-V24-Umsetzer
· anschliessen
· Geräte-Treiber installieren – Internet
=
· Im Gerätemanager COMx?
·=
Keil: EIN_AUS aufrufen und im Zauberstift MON51 =
span> einstellen
· Debug starten
· =
span>
· =
span>
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0111.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
COM-Po=
rt
· Im Geräte-Manager –
Systemsteuerung à
System à =
Hardware
à
Gerätemanager
· Arbeitsplatz à Eigenschaften
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0112.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
31.10.=
2007
· EIN_AUS Inbetriebnahme
· VISTA – Test erfolgt no=
ch
unter voller Hoffnung ;-)
· Hier noch unter XP – Keil – Vista ???
=
div>
· 12 USB-V24 Umsetzer
·
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0113.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Interr=
upt
- Polling
· Interrupt – Ereignisorientiert – Betriebssystem
=
;
· Beispiel: Briefkasten -=
Briefkastenüberwachungssystem
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0114.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
TIMER<=
/div>
· Jede µs kommt eine
steigende Flanke auf einen 16-Bit Zähler. Wie oft pro
Sekunde läuft der Zähler über?
· 15 mal
· TH0 =3D High Byte von Timer 0
· TL0 =3D Low Byte von Timer 0
· TR0 =3D1 Zähler zählt
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0115.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Rücksp=
rungadresse
· Interner Datenspeicher: 08,09 – 0A,0B
=
div>
· Wichtig: Nicht aus
Subroutine – Unterprogramm springen
· Test Springen Sie im
Unterprogramm mit jmp auf Abfrage
· Call MARKE
Unterpro=
gramm
ret
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0116.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Interr=
upt
· Interrupt – Vektor
· ISR
· reti
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0117.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
ajmp,
ljmp, jmp??
· Jmp verwenden à Compiler setzt ajmp oder ljmp ein
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0118.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
PWM TI=
MER2
· Puls Weiten Modulation
· Programmierung Timer 2 PWM
· Reload =3D Legt die Periodendauer fest
<=
/div>
· Compare =3D Legt den
Zeitpunkt fest von LOW nach HIGH
· I/O-Einheit =3D
Funktionsweise der Ausgabeeinheit fest
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0119.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
servol=
r.asm
· Bitte im Simulator testen ;-)
· Bitte mit Servomotor testen
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0120.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
5.11.2=
007
Guten Morgen
· PWM
· Dozent ;-( warum?
20ms Periodendauer à 50Hz dauerte ca. 2 Minuten
=
div>
· BITTE! ;-) Mindmap für Labor-Projekt erstellen
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0121.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
PWM =
div>
· Anfangspunkt –
· Der Ort bzw. die Stellu=
ng
des Servos wird durch das CC1-Register festgelegt
=
· CCH1 + CCL1 =3D 16 Bit-Register
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0123.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Kleine
Aufgabe
· Der
Servo an der Abfüllanlage wird an eine Anfangsstellung bewegt=
13;
· Welches Programm verwen=
den
Sie?
· ServoLR
· Os=
zi ~
63536 – muss mit Wert von CC1 korrespondieren
· CCL1 in Adresse: 0C2h=
13;
· CCH1 in Adresse: C3h=
3;
· F830H =3D 63536
· FC40H =3D 64576 – Kugel=
fällt
in den Behälter
· F910H =3D 63760 – Kugel=
fällt
aus Rohr
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0122.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Remote
Desktop
· Tastatur und Bildschirm
wird von einem anderen Rechner übernommen
· WICHTIG!!! Datenblätter in extra Fenster öffnen!=
3;
· Steuern das Programm
„Abfüllanlage“ über 2 Rechner + EURO_535
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0124.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
6.11.=
2007
Guten Morgen FT_WS07_P11
· Programm FT_WS07_P11
· Zu Beginn fährt der Servomotor in die „Mitte“
<=
/span>
· T2à Kugel fällt aus dem Rohr
· T3à Kugel fällt in den Behälter
· CCEN-Register nicht im Buch aufgeführt à
=
· Verbindliche Informatio=
nen
Datenbuch des Herstellers!
· CCEN 0000 1000b Compare enabled
· Hinweis: „Servo.asm“
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0125.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
12.11.=
2007
Guten Morgen!
· GEMEINSAME Dokumentation – Dokumentationsform
<=
/span>
· Möglichst viel Dokumentationsarbeit sparen!!!
<=
/span>
· Viel schrauben! ;-)
·
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0126.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0127.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
Timer2=
Programm: FT_WS07_P12
· Drei Leuchtdioden werden
mit einer Periodendauer von 10ms angesteuert. Folgende
Leuchtinensität ist gefordert:
L1 leuchtet mit 25%
L2 leuchtet mit 50%
L3 leuchtet mit 75%
· Tipp: Kopieren von P1.1 über Carry
· Programmvorlage: FT_WS07_P11
· In der Warteschleife die Ports kopieren
=
· CCEN , CC1, CC2, CC3
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0128.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik
13.
November 2007
· „Gemeinsame Basis der
Verständigung“ ;-)
· Strukturiertes
Vorgehen
· Au=
fteilung
in Module – Was geht rein – Was kommt raus? Spannung, St=
rom,
Drehmoment
· Methodisches Vorgehen=
13;
· VDI 2222
· VDI 2224
<=
span
style=3D'color:red'>·=
Ist nicht zugänglich über Hochschulbibliothek
<=
span
style=3D'font-size:75%;color:red'>· PH
Bibliothek
<=
span
style=3D'font-size:75%;color:red'>· RZ-P=
ool
<=
span
style=3D'font-size:75%;color:red'>· VPN =
vom
eigenen Rechner
------=_NextPart_01C8582B.A7ECC850
Content-Location: file:///C:/82F30514/WS07_MC_FT-Dateien/slide0129.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="windows-1252"
Mikrocomputertechnik