Up And Down – Hardwarepraktikum Versuch 6

Diesesmal haben wir eine Aufzugsteuerung programmiert. Am Modell konnte mit dem beschriebenen PAL ein Bärchen (wie süß) über drei Etagen Aufzug fahren lassen. Man konnte auch ganz böswillig von aussen den Notaus-Schalter betätigen und das Bärchen zwischen zwei Etagen hängen lassen ;)

Quellcode

;PALASM Design Description
;
;---------------------------------- Declaration Segment ------------
TITLE    Aufzug
PATTERN  
REVISION 
AUTHOR   
COMPANY  
DATE     06/29/04
;
CHIP  _Aufzug  PAL22V10
;
;---------------------------------- PIN Declarations ---------------
PIN  1          CLK                                              ;       
PIN  2          ANFOR0                                           ;       
PIN  3          ANFOR1                                           ;       
PIN  4          ANFOR2                                           ;       
PIN  5          ETAG0                                            ;       
PIN  6          ETAG1                                            ;       
PIN  7          ETAG2                                            ;       
PIN  8          NOTAUS                                           ;       
PIN  9          TIME                                             ;       
PIN  12         GND                                              ;
PIN  15         MOTAUF                              COMBINATORIAL;
PIN  16         MOTAB                               COMBINATORIAL;
PIN  17         Q0                                    REGISTERED ;       
PIN  18         Q1                                    REGISTERED ;       
PIN  19         Q2                                    REGISTERED ;       
PIN  20         STOP0                               COMBINATORIAL;
PIN  21         STOP1                               COMBINATORIAL;
PIN  22         STOP2                               COMBINATORIAL;
PIN  24         VCC                                              ;       
;
;State Machine Segment
;
STATE
MOORE_MACHINE
DEFAULT_BRANCH HOLD_STATE
START_UP := POWER_UP -> Auf
;
Auf = /Q0 * /Q1 * /Q2
Etage0 = Q0 * /Q1 * /Q2
Etage1 = /Q0 * Q1 * /Q2
Etage2 = Q0 * Q1 * /Q2
Ab = /Q0 * /Q1 * Q2
WaitAuf = Q0 * /Q1 * Q2
WaitAb = /Q0 * Q1 * Q2
;
Etage0 := LF0AUF -> Auf

+-> Etage0 ; Etage1 := LF1AUF -> Auf +LF1AB -> Ab +-> Etage1 ; Etage2 := LF2AB -> Ab +-> Etage2 ; Auf := NOTAUS -> WaitAuf +AUFOK1 -> Etage1 +AUFOK2 -> Etage2 +-> Auf ; Ab := NOTAUS -> WaitAb +ABOK1 -> Etage1 +ABOK0 -> Etage0 +-> Ab ; WaitAuf := /NOTAUS -> Auf +-> WaitAuf ; WaitAb := /NOTAUS -> Ab +-> WaitAb ; Etage0.OUTF = /MOTAB * /MOTAUF Etage1.OUTF = /MOTAB * /MOTAUF Etage2.OUTF = /MOTAB * /MOTAUF ; Auf.OUTF = /MOTAB * MOTAUF Ab.OUTF = MOTAB * /MOTAUF ; WaitAuf.OUTF = /MOTAB * /MOTAUF WaitAb.OUTF = /MOTAB * /MOTAUF ; ;Conditions Segment ; CONDITIONS ; LF0AUF = (ANFOR1 + ANFOR2) * /NOTAUS * /TIME LF1AUF = /ANFOR0 * ANFOR2 * /NOTAUS * /TIME LF1AB = ANFOR0 * /NOTAUS * /TIME LF2AB = (ANFOR0 + ANFOR1) * /NOTAUS * /TIME AUFOK1 = (/ETAG0 * ETAG1 * /ETAG2) * ANFOR1 * /NOTAUS AUFOK2 = (/ETAG0 * /ETAG1 * ETAG2) * /NOTAUS ABOK1 = (/ETAG0 * ETAG1 * /ETAG2) * ANFOR1 * /NOTAUS ABOK0 = (ETAG0 * /ETAG1 * /ETAG2) * /NOTAUS ; ;----------------------------------- Boolean Equation Segment ------ EQUATIONS ; STOP0 = ETAG0 STOP1 = ETAG1 * ANFOR1 STOP2 = ETAG2 ; ;----------------------------------- Simulation Segment ------------ SIMULATION ; ;-------------------------------------------------------------------
Stefan Moeller

Stefan Moeller

@stefanmoeller
Nach oben scrollen