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, June 17, 2008

[oopic] Re: Serial To LCD messing up

--- In oopic@yahoogroups.com, Andrew Porrett <slicerwizard@...> wrote:
>
> At 11:20 AM 6/17/2008, ef721 wrote:
> >I'm using the oSerialH object
> >http://www.oopic.com/oserialh.htm
> >
> >It doesn't say anything about a four byte buffer but it would make
> >sense that a buffer like that is storing the values and repeating them
> >on output. Any idea how to clear this buffer ( if it exists)?
>
> Many of the old timers on this list have stayed away from the newer
> features of the V6 compiler. I suspect that this oSerialH object is
> one of them. Instead, we have usually used the oSerialPort object,
> which does have a four byte buffer and is known to work
> properly. Your code should work fine if you just change the one line
> where you declare your serial port.
>
>
> ...Andy
>

I can't speak for the new compiler but that logical expression in the
first IF statement caused the identical symptoms in V5 and B.2.2+.
Just breaking the statement into two if <expr> then ... end if solved
the problem.

I suspect there is an issue with not short circuiting the evaluation
when the first equality is false. So what happens when you read the
port and it hasn't received anything? That's exactly what would
happen if the evaluation is not short circuited.

Kind of like 'what happens if I read a circular buffer ahead of the
insert pointer'? Well, I'm going to read the entire buffer again...

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: