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.

Friday, February 15, 2008

Re: [oopic] Re: events again

We are suspecting that the C1.1+ firmware or the compiler that compiles
to the C1.1+ firmware is wrong. My posted event code (that simply flips
the bit) works fine on B2.2+, but acts weird on C1.1+ code. We've found
it in ooPIC C boards, ooPIC R boards and ooPIC S boards. The factory is
looking into where the problem lies.

DLC

rtstofer wrote:
>> Richard,
>>
>> Thanks for the reply.
>>
>> Excellent point! The event must be taking slightly longer than one
>> second. I changed the delays to 250 and guess what? It now
>>
> flashes
>
>> in one second cycles indefinately.
>>
>> While that mystery is solved, the bigger question is: Why do I have
>> to call the BLINK_Code() as a subroutine first? Remember, when I
>> have that call statement commented out, the event handler is not
>> firing. Any thoughts on that?
>>
>> Thanks,
>> Dogulas
>>
>>
>
> Beats me! For V6 and an OOPic II+ (B2.2+) the following code works
> fine:
>
> ' Code for V6 of compiler
>
> Dim BLINK As New oEvent
> Dim WIRE As New oWire
> Dim LED As New oDIO1
>
> Sub Main()
> LED.IOLine = 7
> LED.Direction = cvOutput
> WIRE.Input.Link(ooPIC.Hz1)
> WIRE.Output.Link(BLINK.Operate)
> WIRE.Operate = cvTrue
> End Sub
>
> Sub BLINK_Code()
> LED = cvOn
> ooPIC.Delay = 250
> LED = cvOff
> ooPIC.Delay = 250
> End Sub
>
> I had to change the IOLine, I have a permanent LED on IOLine 7 and I
> got rid of the useless DO...LOOP construct.
>
> Pay heed to what Andrew said earlier, you don't want to hang around
> in an event handler. Toggle the LED, use a counter, anything EXCEPT
> OOPic.Delay.
>
> The same code works in V5 if the OOPic.Delay values are set to 25.
>
> Richard
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------


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: