SX/B PWM command frequency
Robert Schwartz
Posts: 141
Hello everybody,
Does anyone know the frequency for the PWM command in SX/B. Also, is it constant, or dependant on clock speed?
Thanks,
Robert Schwartz
Does anyone know the frequency for the PWM command in SX/B. Also, is it constant, or dependant on clock speed?
Thanks,
Robert Schwartz
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
If you set the interrupt rate at 1 MHz, then your wish is granted.
Cheers,
Peter (pjv)
Thanks,
Robert Schwartz
Post Edited (Robert Schwartz) : 7/8/2005 6:49:38 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I see I should read more carefully Robert as your question was SX/B related. I missed that point, and answered a the question in an assembler reference....·thanks Paul for catching that.
As you all know, I am SX/B challenged, hence unqualified to comment; I should have kept my mouth shut.
Happy SX/B'ing,
Peter (pjv)
Its too late to diasect it completely tonight, but its clear its a triple loop. 1st param is the # of cycles, 2nd·param is the accumulator which is incremented by the duty cycle each pass, the carry bit determines the output. 3rd and 4th params, Im not sure of, one of these probably determines the general frequency.
Since the duration parameter is in milliseconds, __PARAM3 and __PARAM4 create enough loops to last for 1 millisecond.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·