20X2 and PWM

com64

New Member
I wanted to use the PWM command with the 20X2 part. In the documentation should the 20X2 support this command but the only thing I get is an error :

“pwm b.2,150,20
^
Error: 'pwm' command not supported in this mode!”

What do I wrong?
 

inglewoodpete

Senior Member
Manual 1, too

Another place to look at/read is Manual 1 Page 27: PICAXE-20M/20X2 Pinout and Circuit.

Every function is not available on every pin. This is a result of what the underlying PIC's silicon is able to do.
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

I'm not sure if the PWM command is supported on 20X2 ( and 28X2 /40X2 ) and this is a compiler issue or if it isn't supported and it is a documentation issue. I suspect the compiler is more correct and we have accidentally documented a command as available which is not. I'll seek clarification on the matter.
 

Technical

Technical Support
Staff member
PWM is available on all X2 parts, but a bug in the compiler is preventing it from being compiled - sorry about that! We will fix for the next software release which is due next week.
 

com64

New Member
Thanks for the information. I wait for the new compiler this week and otherwise I take the hwpmduty command what is in my case a useful tip.
 

odlids

New Member
Does the compiler bug only effect the PWM commands or are HPWM commands affected as well?

The reason I ask is that the I have a 20X2 which steadfastly refuses to recognise the active polarity settings, and will not give a complementary output on Pin B when in Half Mode (HPWM).

If there is a known bug I will stop tinkering.

Is the new software release getting any closer?
 
Top