simple pwm coding
bbrien
Posts: 561
in Propeller 1
I am using detect to test for pulsewidth modulated signals and copying them to an output. I am sequentially testing eight inputs but when none of the inputs are active, I want to generate a pwm signal using 0-255 level. How would I go about doing this?
Comments
What's hooked up to what?
of a P.W.M. signal. If an input has a signal it is an active input. No signal, it is an inactive input. P.W.M. signal will be generated
at the end of the instructions. For example elseif detect:=ina[5]
outa[14]:=ina[5]
outa[11]:=1
else (generate P.W.M. =15/255)
Hope this helps.
Perhaps a God's-eye description of the project is in order. What is the purpose of the code you're after? What kind of hardware are you dealing with?
No doubt in my mind that the hardest part of helping a poster is figuring out what they want to do and what hardware they have. Sometimes feels like pulling teeth.