Zitat Zitat von PhoenixTS82
Code:
declare sub led(x as byte, y as byte)

call led(1,1)

sub led(x as byte, y as byte)
   porta = 0       'erstmal alle leds auf 0 setzen
   portc = 0
   x = x - 1
   y = y - 1
   porta.x = 1
   portc.y = 1
end sub
Hallo PhoenixTS82!

Mir ist gerade eingefallen, dass ich auch mal so ein Problem hatte. Ich glaube das liegt an Bascom und man muss das Problem über eine **externe** Variable (unschön) lösen.

Code:
dim tmp as byte

sub led(x as byte, y as byte)
   tmp = x - 1
   porta.tmp = 1
   ...
end sub
Probier es mal aus. Vielleicht funktioniert es.

mfg
Gerold
:-)