Ein kleines Problem habe ich aber noch 
Folgendes Programm läuft wunderbar:
Code:
$regfile = "m16def.dat"
$crystal = 4000000
Dim X As Word
Config Pind.4 = Output
Config Pind.4 = Output
Config Timer1 = Pwm , Pwm = 8 , Prescale = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up
Do
For X = 1023 To 0 Step -1
Pwm1b = X
Pwm1a = X
Waitms 10
Next X
Loop
End
Damit kann ich mit einem M16 die LED-Hintergrundbeleuchtung dimmen.
Ich möchte das ganze aber mit OC0 (Pinb.3 am M16) machen.
Kann mir da jemand helfen? Ich habe betreits einiges ausprobiert, aber noch nicht das richtige gefunden.
Lesezeichen