How generate short pulse in spin language ?
Francesco Santandrea
Posts: 16
Hello,
this simple spin program generate short pulse at pin 0
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x
PUB Pulse
dira[noparse][[/noparse]0]:=1
!outa[noparse][[/noparse]0]
!outa[noparse][[/noparse]0]
Why the on time of pulse is so long ? about 20 microseconds (45kHz)
How can generate a short pulse in spin language ?
Thanks
Francesco Santandrea
this simple spin program generate short pulse at pin 0
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x
PUB Pulse
dira[noparse][[/noparse]0]:=1
!outa[noparse][[/noparse]0]
!outa[noparse][[/noparse]0]
Why the on time of pulse is so long ? about 20 microseconds (45kHz)
How can generate a short pulse in spin language ?
Thanks
Francesco Santandrea
Comments
OPS
...
about 20 microseconds (45kHz) ...
is .... about 10 microseconds (100kHz if repeated)...
http://www.rayslogic.com/propeller/PulseGen.htm
-Phil
Thanks !!!
and if I should be reduced the time between pulses?
Is possible with stop of Cogs ? or otherwise ?
Francesco Santandrea
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
for continuos output
example for
PWM high resolution (10-12 bit and more)
100 - 200 kHz and more
To output a 10-bit PWM at 100KHz would require a pulse width resolution of less than 10ns. You won't get PWM output like that with the Propeller. If you don't need true PWM, though, but can settle for the Propeller counter's DUTY mode output, you will come close to your objective.
-Phil