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.

Thursday, July 19, 2007

Re: [oopic] Question about serial communication

I'm not entirely certain what you are wanting, but I can say that you won't gain anything by using oBuffer with oSerial. You will need to carefully consider how you format your commands so that parsing them is as simple and fast as possible.

DLC

ooPIC Tech Support

-----Original Message-----

From: "klingonhero" <klingonhero@yahoo.com>
Subj: [oopic] Question about serial communication
Date: Thu Jul 19, 2007 8:36 am
Size: 1K
To: oopic@yahoogroups.com

Firstly, I apologize for two things:
1. You've probably heard this question a thousand times before and are
sick of it
2. This is more my ignorance about serial communications and programming

I've been trying to get my oopic to move a dc motor when I send
commands like "fw" or "bk". I tried looking in OOpic programming book
and googled online. I see lots of example on how to send a message from
the oopic back to a computer, but not the opposite. I managed to find
an example program that did flow control and everything. It used two
oBuffer objects to store two commands "red" and "green" to light two
LEDs. I needed more commands and the compiler complained that I
couldn't add more objects because of memory. So... I would change the
value of the obuffer object inline (in the loop) and then compare the
value against the actual serial buffer. Not everything was working
right. It seemed that if I changed the object more than twice strange
things would happen. End of long story and on to the question.

Is there a detailed template or flowchart for how this is done? I would
much prefer if there was a program someone could just post, but I
understand if no one wants to do this. I don't mind the hard work of
programming it as long as I understand what I need to do. I just don't
understand how this is supposed to be done.

Thanks,
Mike

Yahoo! Groups Links

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! News

Get it all here

Breaking news to

entertainment news

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yahoo! Groups

Moderator Central

Connecting a world

of moderators

.

__,_._,___

No comments: