MyMelon
Member level 2
what's the problem with my code it tells a CPU overload in proteus do i have a problem in ckt or in program
code:
Device 16F628A
Xtal=20
All_Digital true
Symbol Led PORTB.3
Symbol sw1 PORTA.0
Symbol sw2 PORTA.1
Input sw1
Input sw2
Output PORTB
Dim x As Word
x=100
loop:
If sw1=0 Then x=x-10elayMS 200
If sw2=0 Then x=x+10elayMS 200
PWM Led,x,1000
GoTo loop
https://imageshack.us/photo/my-images/201/pwmh.jpg/
code:
Device 16F628A
Xtal=20
All_Digital true
Symbol Led PORTB.3
Symbol sw1 PORTA.0
Symbol sw2 PORTA.1
Input sw1
Input sw2
Output PORTB
Dim x As Word
x=100
loop:
If sw1=0 Then x=x-10elayMS 200
If sw2=0 Then x=x+10elayMS 200
PWM Led,x,1000
GoTo loop
https://imageshack.us/photo/my-images/201/pwmh.jpg/