Mr.K
New Member
program by 3vo for a dimmer can anyone convert this to asm for a PIC16F628a? I will rep(now that I know what the hell it is lol)
-Thanks Mr.K
-Thanks Mr.K
Code:
// main program...
If PWM.SetFreq(5000) Then
Duty = 0
While true
PWM.SetDutyPercent(Duty)
If ( (sw0 = 1) And (Duty < 10) ) Then
Inc(Duty)
DelayMS(10)
While sw0 = 1 Wend
EndIf
PWM.SetDutyPercent(Duty)
If ( (sw1 = 1) And (Duty >0) ) Then
Dec(Duty)
DelayMS(10)
while sw1 = 1 wend
EndIf
Wend
EndIf