Uiiii.... das ging aber schnell !!!
Danke, für die fixe Antwort!
Ich dachte ja auch, das der Tiny13 keinen XRAM hat aber sowohl bei
DIM..XRAM als auch DIM..ERAM wird die Variable abgearbeitet!
Habe mal ein kleines Lauflicht zur Probe gebastelt!
Wo werden dann also die Daten abgelegt ???
Ich wollte nur den Speicher, der nicht so oft beschrieben werden soll, schonen!
Code:'************************************************************ 'Voreinstellungen $regfile = "ATtiny13.DAT" ' Definitionen für ATtiny13 Config Portb = Output ' alles Ausgänge Portb = 1 ' Pullup setzen um Ausgang beim Einschalten auf 0 zu halten Dim I As Xram Byte 'Dim I As ERAM Byte '************************************************************ '************************************************************ 'Hauptprogramm Do Gosub Vor Gosub Rueck Gosub Aufl Loop End '************************************************************ '************************************************************ 'Unterprogramme '************************************************************ Vor: For I = 1 To 50 Portb.0 = 0 Portb.1 = 1 Portb.2 = 1 Portb.3 = 1 Waitms 30 Portb.0 = 1 Portb.1 = 0 Portb.2 = 1 Portb.3 = 1 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 0 Portb.3 = 1 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 1 Portb.3 = 0 Waitms 30 Next I Return '************************************************************ Rueck: For I = 1 To 50 Portb.0 = 1 Portb.1 = 1 Portb.2 = 1 Portb.3 = 0 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 0 Portb.3 = 1 Waitms 30 Portb.0 = 1 Portb.1 = 0 Portb.2 = 1 Portb.3 = 1 Waitms 30 Portb.0 = 0 Portb.1 = 1 Portb.2 = 1 Portb.3 = 1 Waitms 30 Next I Return '************************************************************ Aufl: For I = 1 To 100 Portb.0 = 0 Portb.1 = 1 Portb.2 = 1 Portb.3 = 1 Waitms 30 Portb.0 = 0 Portb.1 = 0 Portb.2 = 1 Portb.3 = 1 Waitms 30 Portb.0 = 0 Portb.1 = 0 Portb.2 = 0 Portb.3 = 1 Waitms 30 Portb.0 = 0 Portb.1 = 0 Portb.2 = 0 Portb.3 = 0 Waitms 30 Portb.0 = 1 Portb.1 = 0 Portb.2 = 0 Portb.3 = 0 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 0 Portb.3 = 0 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 1 Portb.3 = 0 Waitms 30 Portb.0 = 1 Portb.1 = 1 Portb.2 = 1 Portb.3 = 1 Waitms 30 Next I Return '************************************************************ 'Ende







Zitieren
Lesezeichen