PWM PWMOUT Syntax /description

Michael 2727

Senior Member
Hi I'm new to the forum.

In the syntax description of PWM and PWMOUT
it states:
Syntax:
PWM pin,duty,cycles
- Pin is a variable/constant (0-7) which specifies the i/o pin to use.
- Duty is a variable/constant (0-255) which specifies analog level.
- Cycles is a variable/constant (0-255) which specifies number of cycles. Each
cycle takes about 5ms.

Example:
pwm 4,150,20 ‘ send 20 pwm bursts out of pin 4
pause 20 ‘ pause 20 ms


But what I seem to get out of the pin is:

pwm 4,150,20

on pin 4, 150 x the 20 ms, that is 150 pulses of 20 ms ?

this also seems to apply to the "pwmout"
command.

Am I right here or totaly off the track, down the gully, and half a mile up the creek ?
Just curious.


Michael 2727
 

bgrabowski

Senior Member
I have e-mailed you a datasheet which explains the pwmout command in more detail.

Note that the pwm command needs to be periodically refreshed.
 
Top