This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Tuesday, April 8, 2008

[oopic] Re: Delay in ooPIC

--- In oopic@yahoogroups.com, "mora_sutha" <mora_sutha@...> wrote:
>
> Hello,
>
> I'm using V6 compiler. May I know the delay in V6?
> If I need to change the timing delay according to a potentiometer
> position, I need to change the countdown value. But I need the timing
> in 5-10 mS range. Is it possible?
>
> G. Sudarsan

This has been answered below. The units of OOPic.Delay for V6 are 1
mS so a delay of 1000 would be ABOUT 1 second. However, it is
probably not possible to get down to the 5 mS range with any kind of
accuracy because it takes nearly that long for the OOPic to just fetch
and execute the instruction. And that overlooks the reality that
lines of code get executed when the OOPic doesn't have anything better
to do.

You need to do as suggested: use an oCountDown and a virtual circuit.
Still you will not get precise timing; there will be jitter.

If precise timing is a requirement, you are using the wrong device.
You could try a regular PIC or an AVR.

Richard


>
>
>
> --- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@> wrote:
> >
> > Are you using the V.6 or V.5 compiler? I'm assuming that you are
using
> > V.6 since V.5 delay is in 1/100 of a second. Your problem is that
you
> > are using a script to do the timing - A script is run when there is
> time
> > to run it, it is not entirely deterministic. If you want reliable
> > timing pulses to an IO line then you need to use Virtual Circuits.
> > oClock with oCountDown or some similar combination will work far
better
> > than your script when it comes to accurate and repeatable times.
> >
> > DLC
> >
> > mora_sutha wrote:
> > > Hi,
> > > I'm using ooPIC's delay function to change a digital O/P
state. So
> > > after setting the state as ON, I'm giving a delay to maintain that
> > > state. Same thing for OFF state as well. But I'm getting different
> delay
> > > times when checked with oscilloscope. For example, when I put
> delay = 5,
> > > I'm getting a delay of 15mS. Can anybody tell what may be the
> reason? To
> > > change a line's state as we want, is this method is correct?
> > >
> > > The code fragment:
> > >
> > > Dim line1 as new oDIO1
> > > ........
> > > line1.state = cvOn
> > > ooPIC.delay = 5
> > > .........
> > >
> > > With Regards,
> > > G. Sudarsan
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > > ------------------------------------
> > >
> > > 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:

http://docs.yahoo.com/info/terms/

No comments: