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 1, 2008

Re: [oopic] Strange serial operations

At 11:05 AM 4/1/2008, Matt Elias wrote:
> Do
> If Serial.Received = 1 Then
> LED.State.Invert
> buffer.Value=Serial.Value
> buffer.Location=buffer.Location+1
> LED.State.Invert
> End If

That code is far too slow to keep up with 9600 bps data. It can be
improved, but it'll still drop characters:

do
while serial.received then
buffer = serial
buffer.location = buffer.location + 1
end while


If oBuffer has an increment method, try using it.

At 9600 bps, you can send 960 characters per second. In that time,
the OOPic can execute about 350 lines of user source code. You do the math...

Is there any way to reduce the data rate to 1200 bps?

BTW, very nice indenting; it's a refreshing change.

> If In=1 Then
> Wait Until In=0
> LED.State.Invert
> buffer.Location=0
> For i = 1 To 20
> Serial.Value=buffer.Value
> buffer.Location=buffer.Location+1
> Next i
> buffer.Location=0
> For i = 0 To 30
> buffer.Value=i+48
> buffer.Location=buffer.Location+1
> Next i
> buffer.Location=0
> LED.State.Invert
> End If
> Loop
>End Sub

------------------------------------

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: