I am also having syntax errors, no matter if I write in capitals or lower case, it indicates that the comma is the problem!!!Yes, a typo in the example,
the command descriptioin is correctly given as;
Which I can confirm works well.Code:pwmduty Syntax: PWMDUTY pin,duty cycles
init:
pwmout 2,150,100 ‘ start pwm
main:
pwmduty 2,150 ‘ set pwm duty
pause 1000 ‘ pause 1 s
pwmduty 2,50 ‘ set pwm duty
pause 1000 ‘ pause 1 s
goto main ‘ loop back to start
#picaxe 14m
symbol CCPR1L = $13 ;on a PIC16F684
pause 100
readadc 4,b0 ;This will read 0~255 (full range)
w1=b0*2 and %11111100 ;0~510, keep 2 LSBs in CCP1CON 0
pwmout 2,127,w1 ;start PWM
main:
pause 50
readadc 4,b0 ;This will read 0~255 (full range)
b2=b0 /2 ;mask high duty bits
poke CCPR1L, b2 ;change duty
;not changing lower duty bits in CCP1CON yet.
sertxd (#b2,13,10)
goto main