' ********************************** ' PROGRAMM: Siebensegment-Anzeige 6 ' ********************************** ' ' Erläuterung: ' Das Programm schaltet die Zahlen 0 bis 9 nacheinander ein. ' Eine Endlos-Schleife wiederholt die Abfolge ständig. ' Das Schalten der Zahlen wird durch kleine Prozeduren (Subs) ' erledigt, die zunächst definiert und im Hauptprogramm nur noch ' mit ihrem "Namen" aufgerufen werden. Dadurch entstehen sehr ' übersichtliche Hauptprogramme. ' Das Programm wird mit der Esc-Taste abgebrochen. ' ' ============================================================== ' Vereinbarungsteil ' ' Modell: CIUS-Aufzug ' ' Anschlussbelegungen des Interfaces: ' Digitale Ausgänge (DOUTs): ' DOUT 1: a ' DOUT 2: b ' DOUT 3: c ' DOUT 4: d ' DOUT 5: e ' DOUT 6: f ' DOUT 7: g ' DOUT 8: ' ================================================================= ' ' Variablendeklaration: ' --------------------- ' DIM Zeit ' ' Wertzuweisung: ' -------------- ' Zeit = 0.5 ' ' Definition der Prozeduren: ' -------------------------- SUB Zahl0 DOUTS "0000 0000 011 1111" END SUB SUB Zahl1 DOUTS "0000 0000 0000 0110" END SUB SUB Zahl2 DOUTS "0000 0000 0101 1011" END SUB SUB Zahl3 DOUTS "0000 0000 0100 1111" END SUB SUB Zahl4 DOUTS "0000 0000 0110 0100" END SUB SUB Zahl5 DOUTS "0000 0000 0110 1101" END SUB SUB Zahl6 DOUTS "0000 0000 0111 1101" END SUB SUB Zahl7 DOUTS "0000 0000 0000 0111" END SUB SUB Zahl8 DOUTS "0000 0000 0111 1111" END SUB SUB Zahl9 DOUTS "0000 0000 0110 0111" END SUB ' Hauptprogramm: ' -------------- DO Zahl0 WAIT Zeit Zahl1 WAIT Zeit Zahl2 WAIT Zeit Zahl3 WAIT Zeit Zahl4 WAIT Zeit Zahl5 WAIT Zeit Zahl6 WAIT Zeit Zahl7 WAIT Zeit Zahl8 WAIT Zeit Zahl9 WAIT Zeit LOOP ' Ende