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

[oopic] Re: yet another problem with events... urgent

--- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> I see where you have defined HOW to patch the code with the
constants
> and such but I don't see WHERE you installed the patch.

You will have to recalculate the event code location after you insert
the patch code. Also, I think that you have to separate the high and
low byte of the address. I usually try to keep my event code address
less than 256 to avoid this. If you move the event subroutine to the
top of the program (above Main) this should not be an issue and it
has the added benefit of not changing everytime you change the
program. It will change if you add or remove objects...they always
come first.

>
> See message 37874 (and the rest of the thread).
>
> I would DIM the oEvent first just to get a low address - not that it
> matters.
>
> If it still doesn't work after the patch is properly applied, you
will
> just have to wait for the revised compiler. Or find another way to
do
> the project.
>
> Richard
>
>
> --- In oopic@yahoogroups.com, "rauli.karki" <rauli.karki@> wrote:
> >
> > I have this kind of code and i can't get it work. Main-prosedure
is
> > working fine but when i launch event all outputs changes
condition and
> > then it takes while when board resets itself... Oopic III+ C1.1+
> >
> > Dim Valo1 As New oDIO1 (26,cvOutput)
> > Dim Valo2 As New oDIO1 (28,cvOutput)
> > Dim Valo3 As New oDIO1 (11,cvOutput)
> > Dim Valo4 As New oDIO1 (13,cvOutput)
> > Dim Valo5 As New oDIO1 (14,cvOutput)
> >
> > Dim Pun As New oButton
> > Dim Vih As New oButton
> > Dim Kyt As New oButton
> >
> > Dim A As New oEvent
> > Dim D As New oDIO1
> > Dim W As New oWire
> >
> > ' I have tried this fix but it didnt help...
> > Dim RAM_Access3 As oRAM
> > Const Event_Obj_Location3 = 332 ' oEvent "Event" memory location
> > Const EventCode_Location_Hi3 = 1 ' Event_Code EEPROM location High
> > Const EventCode_Location_Lo3 = 76 ' Event_Code EEPROM location Low
> >
> >
> > Sub Main()
> > Pun.IOLine = 16
> > Vih.IOLine = 4
> > Kyt.IOLine = 18
> >
> > D.IOLine = 1
> > D.Direction = cvInput
> > W.Input.Link(D)
> > W.Output.Link(A.Operate)
> > W.InvertIn = cvTrue
> > W.Operate = cvTrue
> >
> > Valo5 = 0
> > ooPIC.Delay = 1000
> > Sekvenssi
> > Valo5 = 1
> >
> > Do
> > If Kyt = 0 Then
> > If Pun = 0 Then
> > Sekvenssi
> > End If
> > End If
> >
> > If Kyt = 1 Then
> > If Pun = 0 Then
> > Valo1 = 0
> > Valo2 = 0
> > Valo3 = 0
> > Valo4 = 0
> > ' Valo5 = 0
> > ooPIC.Delay = 100
> > End If
> > If Vih = 0 Then
> > Valo1 = 1
> > Valo2 = 1
> > Valo3 = 1
> > Valo4 = 1
> > ' Valo5 = 1
> > ooPIC.Delay = 100
> > End If
> > End If
> > Loop
> >
> > End Sub
> >
> > Sub Sekvenssi
> > Valo1 = 0
> > ooPIC.Delay = 1000
> > Valo2 = 0
> > ooPIC.Delay = 1000
> > Valo3 = 0
> > ooPIC.Delay = 1000
> > Valo4 = 0
> > ooPIC.Delay = 1500
> > Valo1 = 1
> > Valo2 = 1
> > Valo3 = 1
> > Valo4 = 1
> > End Sub
> >
> > Sub A_Code()
> > Do Until Vih = 0
> > Valo5.Value = ooPIC.Hz1
> > Loop
> > ooPIC.Delay = 500
> > Valo5 = 1
> > 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: