pwmout and hpwm

DaveBl

New Member
Hi All, I am having trouble getting PWM output from my 40X1.
Issuing the simple command " pwmout 1, 255,512 " results in nothing on
portc 1, not on a meter or a scope. Same with the 28X1. Am I missing somethig
like pulling up or down? at the moment I trying to dim LEDs directly attached to the
pwm outputs, but ultimately I want to use a ULN 2803A to dim much bigger 1W LEDs.

Any clues please

Thanks

Dave Black
 

hippy

Ex-Staff (retired)
It should work, and works on my 28X1.

PWMOUT stops when END or end of source code is reached, so add a DO:LOOP after it if that's the only line of code you are trying ...

PwmOut 1,255,512
Do:Loop
 

tiscando

Senior Member
I have found out that the hpwm on 40x1s does not work well (in the 'single' pin mode so far), possibly due to problems with the pin mask. I think normal pwmout should work OK. The Hpwm on a 28x1 works ok.

Any updates about the 40x1's hpwm module being duff (on the 'single' mode or all modes)?

edit: just found out from the manual that it now says in the hpwm command section that 40x1s do not support Hpwm.
 
Last edited:

boriz

Senior Member
It should work, and works on my 28X1.

PWMOUT stops when END or end of source code is reached, so add a DO:LOOP after it if that's the only line of code you are trying ...

PwmOut 1,255,512
Do:Loop
Add that to the FAQ.

Where is the FAQ by the way?
 

hippy

Ex-Staff (retired)
It's all described in PICAXE Manual 2 under the END command ....

Note that as the compiler always places an END instruction after the last line of a program, this command is rarely required. The end command switches off internal timers, and so commands such as servo and pwmout that require these timers will not function after an end command has been completed.
 
Top