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.

Monday, October 15, 2007

[oopic] Re: How to use oSerialL for reception of data ?

--- In oopic@yahoogroups.com, "patrickcastelein" <pat160@...> wrote:
>
> Hi Dennis,
>
> yes, I've been reading that part of the manual over and over ...
> The scary part is where it says : "...while the oSerialL Object is
> waiting for incoming serial data, the program flow is stopped".
> I don't want the program flow to stop, my program has other tasks
to
> do while it should receive the serial data in the background (event-
> driven).
> Is there a way this can be done ?
>
> Thank you,
> Patrick


When I first saw your posting I was going to jump in and tell you
that oSerialL is the absolute worst possible implementation of serial
IO when it comes to receiving. It is bit-banged and the internal
machine just sits and waits for line transitions. It works ok for
transmitting as long as the receiver is ready to go. You can work
around this part.

Even with flow control (which you MUST implement), you will wait for
the next char to arrive whether it is in a few milliseconds or
several months.

You need to come up with another I/O strategy. Use oSerialL only for
output and reserve oSerialPort for input/output. If that doesn't
work, there are chips that convert from I2C or SPI to USART I/O. You
can hang them on the LOCAL I2C bus or perhaps the SPI object will
work.

Richard



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: