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, July 30, 2007

[oopic] Re: Has anyone handled this issue - before

--- In oopic@yahoogroups.com, "Kelly" <kelly4football@...> wrote:
>
> I have an array of 6 pieces of data, and I know I can use the oRam to
> write and read this array, but does anyone know how I can allocate
this
> memory so that I can see that nothing else (other variables) are
going
> to use that space in memory.
>

oRAM is an advanced concept and, AFAIK, the internal use of RAM is not
documented. There are plenty of caution notes that suggest using this
object is a bad idea.

Since you are not looking for persistence, you can simply create an
array of oBytes like:

Dim Things(3) as new oByte
Dim Serial as new oSerialPort

sub main()
Things(1) = 13
Things(2) = 14
Things(3) = 15
If Things(3) - Things(2) + Things(1) = 14 then
Serial.String = "OK" + chr$(10) + chr$(13)
else
Serial.String = "OOPS" + chr$(10) + chr$(13)
end if
Serial.String = STR$(Things(2)) + chr$(10) + chr$(13)
end sub

You can also use oBuffer but it isn't as intuitive as simply creating
an array.

OTOH, every oByte requires 2 bytes of object memory and there are only
86 bytes to start with.

If you do want persistence, try oEEPROM.

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: