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.

Wednesday, November 28, 2007

Re: [oopic] io lines oopic C

There is no special reason why you should have this problem. Try using
oDIO1 as the object instead and see if that changes anything. The
obvious thing to check is to make sure that you are looking at the
correct IOlines. Let us know what happens when you change objects.

DLC

dldlhfd wrote:

>I have an Oopic C c1.1+ 6.1.1 compiler
>Using the code below IO lines 14 and 13 use the Led opject and will
>run my 4 transistor H bridge. Lines 10 and 12 use the IOline object
>and won't. Shouldn't they be equalivent statements? Have I just
>programmed the IO lines wrong? I used a volt meter on the IO lines
>got 0 volts always. On the led lines I got 4.67 alternateing between
>the lines as it should. How do I get 5 volts at the IO lines. Can you
>help please?
>***********************
>'This program sends 5 volts to one side of the H bridge
>'at the same time sends 0 volts to the other side
>
>Dim line1 As New oIOLine
>Dim line2 As New oIOLine
>Dim led As New oLED
>Dim led8 As New oLED
>Dim led9 As New oLED
>
>
>Sub Main()
>
> led.IOLine = 7
> led8.IOLine = 14
> led9.IOLine = 13
>
> line1.Line = 10 'assign line1 to pin 10
> line1.Direction = cvOutput 'make it an output
> line1.State = High 'initialize as on
> line2.Line = 12 'assign line2 to pin 12
> line2.Direction = cvOutput 'make it an output
> line2.State = Low 'initilize as off
> Do
> 'forward for 5 seconds
> 'reverse for 5 seconds
> 'line one and two should never be high
> 'at the same time
> led.TurnOnDim 'siginal that it is here
> led9.TurnOnBright
> led8.Brightness = 0
> line2.State = Low 'turn off line 2
> line1.State = High 'turn on line 1
> ooPIC.Delay = 5000 'wait 5 seconds
> led.TurnOnBright 'siginal a change
> led8.TurnOnBright
> led9.Brightness = 0
> line1.State = Low 'turn off line 1
> line2.State = High 'turn on line 2
> ooPIC.Delay = 5000 'Wait 5 seconds
> Loop
>End Sub
>
>
>
>
>
>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: