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.

Friday, June 27, 2008

[oopic] OOPic latency

Hi, I would like to know why the latency in one while loop is very big.
Heres the snippet:
While (Echo == 0)
// TICS prescale set to 2
{
If (TICS.MSB == 1 And Echo == 0)
{
Count = TICS.Count;
If (Count < 65535)
{
Count = Count+65535;
}
//Print.Clear;
Print.Locate(1,0);
Print.VString = "timeout " + Str$(Count) + " " + Str$((Count / 10)
* 8) + " us";
Timeout = 1;
Break;
}
}

I'm making an home-made ultrasonic ranger, which requires the use of
the OOPic and as much preciseness as it can be. For example, just for
this to loop once, TICS will increase by 2000 counts. is that normal?
Would writing this in Visual Basic have better results?

Thanks.

Ray Xu
rayxu@tx.rr.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: