Hi,
gut 
Hier ein Beispielcode, den ich mal für thunder87 für sein Lauflichtprojekt geschrieben habe - ich denke, er hat nichts dagegen, wenn ich den Code hier reinstelle, ist ja schließlich nichts geheimes dran.
Code:
$regfile = "m32def.dat"
$crystal = 16000000
$hwstack = 64
$swstack = 64
$framesize = 128
'$sim
Config Adc = Single , Prescaler = Auto
Start Adc
Config Timer0 = Timer , Prescale = 1
On Timer0 Isr
Enable Timer0
Enable Interrupts
Config Portc = Output
Dim I As Byte
Dim J As Byte
Dim K As Word
Dim W As Word
Dim T As Byte
Dim Wert(9) As Byte
Start Timer0
Portc = 255
Do
Wert(1) = Xx
...
Wert(9) = Yy
Loop
Isr:
Incr T
If T >= 31 Then T = 0
If T < Wert(1) Then Portc.0 = 0
If T >= Wert(1) Then Portc.0 = 1
If T < Wert(2) Then Portc.1 = 0
If T >= Wert(2) Then Portc.1 = 1
If T < Wert(3) Then Portc.2 = 0
If T >= Wert(3) Then Portc.2 = 1
If T < Wert(4) Then Portc.3 = 0
If T >= Wert(4) Then Portc.3 = 1
If T < Wert(5) Then Portc.4 = 0
If T >= Wert(5) Then Portc.4 = 1
If T < Wert(6) Then Portc.5 = 0
If T >= Wert(6) Then Portc.5 = 1
If T < Wert(7) Then Portc.6 = 0
If T >= Wert(7) Then Portc.6 = 1
If T < Wert(8) Then Portc.7 = 0
If T >= Wert(8) Then Portc.7 = 1
If T < Wert(9) Then Portd.7 = 0
If T >= Wert(9) Then Portd.7 = 1
Return
Dieser Code kann also die Helligkeiten von 9LEDs in 256 Stufen regeln (es wären sicherlich auch noch mehr LEDs möglich).
Viele Grüße
Lesezeichen