Thanks for your fast replay.
Maybe it is better if i explain what i want to do a maybe you could
tell me what best to use, since you wrote that the oKnob is not very
stable in the extreme situations of its working range.
I need to control a PWM from a data logger with a 0-5 Volt analogue
output from the logger this should than give me the full range on the
PWM at a frequency of 19,6 kHz. Also i need a digital high when a
pulse is produced that is between 1 and 255 binary on the oPWM.
Thanks for your help in advance.
Regards,
Fred
--- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...> wrote:
>
> Does not work is a bit vague. However, you will have some bobble at
the
> extremes of oKnob and A2D values are notoriously unstable, but this can
> work. However you should link bus.output.link(A.DutyCycle). You have
> not set up the oPWMH.period or oPWMH.prescale settings. You also need
> to have B.Operate = cvTrue set as well. Your "do" loop is not needed.
> The VC will handle the movement of the oKnob value to oPWMH.
>
> DLC
>
> fred_feuerstein8173 wrote:
> > Hello,
> >
> > I hope you can help me im trying to link a 0 to 5 Volts analoug input
> > to a PWM so when no voltage comes in the pulsing is off and when a
> > voltage is introduced that it switches the PWM
> > This is the code i have but it does not work.
> >
> >
> > Dim A As New oPWM
> > Dim B As New oKnob
> >
> >
> > Dim bus As New oBus
> >
> >
> >
> > Sub Main()
> >
> >
> > ooPIC.Delay = 500
> >
> >
> >
> > A.IOLine = 17
> > A.Operate = 1
> > B.IOLine = 1
> >
> >
> >
> >
> > B = cvInput
> >
> > bus.Input.Link(B)
> > bus.Output.Link(A.Value)
> > bus.Operate = cvTrue
> >
> > Do
> > A.Value = B.Position/2
> > Loop
> >
> > End Sub
> >
> >
> > Thanks for your help in advance
> >
> > Fred
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> --
> ------------------------------------------------------
> Dennis Clark ooPIC Tech Support
> www.oopic.com
> ------------------------------------------------------
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment