Hallo, ich wollte mir einen elektrischen Wüfel bauen, mit 7 Leds und einem ATtiny13.
Hier das Programm
	Code:
	$regfile = "attiny13.dat"
$crystal = 1000000
Config Portb.0 = Output
Config Portb.2 = Output
Config Portb.3 = Output
Config Portb.4 = Output
Config Portb.1 = Input
Dim A As Byte
Do
For A = 1 To 6
   If Pinb.1 = 1 Then
      Gosub Ausgabe
   End If
Next
Loop
End
Ausgabe:
   If A = 1 Then
         Portb.4 = 1
      Elseif A = 2 Then
         Portb.3 = 1
      Elseif A = 3 Then
         Portb.0 = 1
         Portb.4 = 1
      Elseif A = 4 Then
         Portb.0 = 1
         Portb.3 = 1
      Elseif A = 5 Then
         Portb.0 = 1
         Portb.3 = 1
         Portb.4 = 1
      Elseif A = 6 Then
         Portb.0 = 1
         Portb.2 = 1
         Portb.3 = 1
      End If
   Wait 1
   Portb.0 = 0
   Portb.1 = 0
   Portb.2 = 0
   Portb.3 = 0
Return
 Ich weiß dass das programm nicht gut ist, aber auf einem ATmega8 aufm Steckbrett tut es seinen dienst. Der 'Zufallsgeneator' funktioniet so, das die schleife gestopt wide wenn der Taster gedrückt wird, und das ist paktisch unvorhergesehen. Wenn ich das für einen ATtiny 13 kompiliere, giebts folgende Fehlermeldungen:
	Code:
	Error:22 Line 13 Out of SRAM space, in file:C:\PROGR....BAS
Error:46 Line 17 Assignment error [A:0 1:112], in file: C:\PROGR...BAS
Error:31 Line 17 Invalid datatype [[0006]], in File: C:\PROGR...BAS
Error:124 Line 17 LOOP expected, C:\PROGR...BAS
 was hat das zu bedeuten? Error:22 Line 13 Out of SRAM space, in file:C:\PROGR....BAS
das sieht auß, als ob der Sram zuklein ist.. aber bei einer Byte-variable?!?
ich versteh das nich [-(  
 
MfG bauteiltöter
						
					
Lesezeichen