Function of OOpic still unclear...help! - bronwyn_3120 - Feb 1 4:23:33 2008
I went to the website www.oopic.com to have a better understanding of
what it does. Is there anyone who could explain what they were saying
in laymans term (see bottom paragraph)? This is my first time using
the Oopic microcontroller. I would really appreciate any kind of help
anyone is willing to give. Thank you =]
OOPic is an acronym for Object-Oriented PIC
The first PICmicro operating system to use an Object-Oriented
approach to hardware control.
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. Every aspect of the Objects can be controlled by
the scripts as the Object do their work with the hardware. The OOPic
Object library contains Object that know how to interact with the
most popular sensors and drive systems around which make the OOPic
ideally suited for robotics of any kind.

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Function of OOpic still unclear...help! - rtstofer - Feb 1 11:32:33 2008
--- In o...@yahoogroups.com, "bronwyn_3120"
wrote:
>
> I went to the website www.oopic.com to have a better understanding of
> what it does. Is there anyone who could explain what they were saying
> in laymans term (see bottom paragraph)? This is my first time using
> the Oopic microcontroller. I would really appreciate any kind of help
> anyone is willing to give. Thank you =]
>
I almost always learn by doing. To that end, there are a lot of
examples in the downloaded IDE directory structure.
First, virtual circuits: these are the reason for the OOPic and while
a somewhat advanced concept, they are the means for getting speed out
of an OOPic.
Suppose you wanted to watch an input and do some processing when it
went to a specific state. You COULD write a loop to do the sample and
conditionally process and this is what you would do in a non-OO
processor. In the case of the OOPic, you define the input with an
oDIO1, connect it to an oEvent object and write the event code. From
your point of view, there is no loop and the event code gets executed
by 'magic'.
Next, objects: by predefining certain objects like oServo, you are
spared having to figure out how to generate a pulse of about 1.0 to
2.0 mS wide, repeating every 20 mS or so. All you do is pick an
IOLine for the output, set the adjust property to certer the servo,
set the operate property to start it up and, finally, every time you
set the value property, the servo position changes. Magic...
The idea is abstraction: you don't need to know how each object
performs its' function, you just need to set the properties and use
the various methods that may be provided.
The OOPic is the absolute fastest way to prototype a gadget. To the
extent that objects are defined that will lead to a solution, you
won't find a better approach.
The downside is that some operations are clubby with no improvement in
sight. Serial IO is one operation that can be done much better in a
more conventional processor. I2C and SPI are others that can be
improved. The size of object memory is another limitation.
There are always tradeoffs. The OOPic is very fast for prototyping
but there are some blazing fast microcontrollers available if
development time is not an issue.
As you work with the OOPic, post your questions here. It is also
useful to post your successes.
Final thought: once you get past the startup portion of the learning
curve, begin to think in terms of virtual circuits. Executing lines
of code is not all that fast on the OOPic so you really want to move
away from long execution loops.
Richard

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )Re: Function of OOpic still unclear...help! - ooPIC Tech Support - Feb 2 1:29:16 2008
You have a whole world of discovery ahead that a single email is
terribly unsuited to give! I strongly recommend that you look through
the example code that comes with the compiler - There are LOTS of demo
programs to run and play with. Along the way you will pick up some of
what is talked about. OO concepts which the ooPIC uses after a fashion
(true OO is even more flexible!) are a way of looking at programming as
a connection between classes of objects, not as subroutines and
procedures. This is the distinguishing characteristic of the ooPIC.
DLC
bronwyn_3120 wrote:
> I went to the website www.oopic.com to have a better understanding of
> what it does. Is there anyone who could explain what they were saying
> in laymans term (see bottom paragraph)? This is my first time using
> the Oopic microcontroller. I would really appreciate any kind of help
> anyone is willing to give. Thank you =]
> OOPic is an acronym for Object-Oriented PIC
> The first PICmicro operating system to use an Object-Oriented
> approach to hardware control.
>
> 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. Every aspect of the Objects can be controlled by
> the scripts as the Object do their work with the hardware. The OOPic
> Object library contains Object that know how to interact with the
> most popular sensors and drive systems around which make the OOPic
> ideally suited for robotics of any kind.
>
>
>

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Function of OOpic still unclear...help! - theo570 - Feb 2 14:14:00 2008
Dennis is 100% correct in saying open up the compiler and play with the
included sample programs. This is the way it finally broke through my
rock.
I will take a stab at the laymans terms part.
An object is simply a program that only knows how to interact with a
specific piece of hardware such as an LMD18200 motor driver IC. The
oDCMoter object knows everything it needs to know about the driver but
does not know what you want it to do. For that, the oDCMotor object has
Properties that you use to tell the object What you want it to do, Where
it is connected, When and How you want it to do something. Once you have
told it What,Where,When and How and start your program that object
begins running. Objects run in the background and will continue to run
exactly as created until you do something to change a property, such as
SPEED in the case of oDCMotor. Many objects can be running at the same
time just waiting for something to change a property. If you had a
oIRPD1 object running a the same time as a oDCMotor object you could
write your code to have one object affect another. If the IR saw
something and your bot was cruising along happily you could change it's
direction with a simple script, there is no need to rewrite all the code
to make a motor go, thats the objects job. IF oIRPD1.VALUE = 1 THEN
oDCMotor.DIRECTION=0
Ted
--- In o...@yahoogroups.com, "bronwyn_3120"
wrote:
>
> I went to the website www.oopic.com to have a better understanding of
> what it does. Is there anyone who could explain what they were saying
> in laymans term (see bottom paragraph)? This is my first time using
> the Oopic microcontroller. I would really appreciate any kind of help
> anyone is willing to give. Thank you =]
> OOPic is an acronym for Object-Oriented PIC
> The first PICmicro operating system to use an Object-Oriented
> approach to hardware control.
>
> 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. Every aspect of the Objects can be controlled by
> the scripts as the Object do their work with the hardware. The OOPic
> Object library contains Object that know how to interact with the
> most popular sensors and drive systems around which make the OOPic
> ideally suited for robotics of any kind.
>

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )Re: Function of OOpic still unclear...help! - Carson Hoyt - Feb 2 16:59:52 2008
Here is a very basic example of oopic code. It exemplifies how the oopic
can be used.
This code is very simple all it does is allow the user to push a button,
triggering an event which then tells the servo what new position it should
be in. To do this I use four objects oServo, oDIO1, oWire, and OEvent.
Each object has a set of variables, which the programmer can set. Go to the
OOPic library for a list of each object's variables. Notice how the
object's functions are interwoven. Essentially objects can be inserted into
other objects as variables for instance button1 is linked to the oEvent by
the oWire hence oWire's variables are input: oDio1 and output oEvent.
Going further the oEvent is basically a piece of procedural programing,
which in this case tells the servo what position it should be in.
Dim servo1 As New oServo
Dim button1 As New
oDIO1 "Notice each
object is identified,
Dim wire1 As New oWire
Dim positionchange1 As New oEvent
Sub Main()
ooPIC.Delay = 500
servo1.IOLine =
31 I asign
hardware lines, and variables for each
servo1.Center =
21 object
servo1.Operate = cvTrue
servo1.Position = 21
button1.IOLine = 7
button1.Direction = cvInput
wire1.Input.Link(button1)
linking the button to the oEvent
wire1.Output1.Link(positionchange1.Operate)
wire1.InvertIn = cvTrue
wire1.Operate = cvTrue
End Sub
Sub positionchange1_Code() oEvent
procedural code
servo1.Position = 63
End Sub
On Feb 1, 2008 1:15 AM, bronwyn_3120
wrote:
> I went to the website www.oopic.com to have a better understanding of
> what it does. Is there anyone who could explain what they were saying
> in laymans term (see bottom paragraph)? This is my first time using
> the Oopic microcontroller. I would really appreciate any kind of help
> anyone is willing to give. Thank you =]
>
> OOPic is an acronym for Object-Oriented PIC
> The first PICmicro operating system to use an Object-Oriented
> approach to hardware control.
>
> 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. Every aspect of the Objects can be controlled by
> the scripts as the Object do their work with the hardware. The OOPic
> Object library contains Object that know how to interact with the
> most popular sensors and drive systems around which make the OOPic
> ideally suited for robotics of any kind.
>
>
>
[Non-text portions of this message have been removed]

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )