>
> 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
>
I think I would use oDIO1 instead of oIOLine. There is some kind of
formula for calculating the .Line property and it isn't clear to me
that it lines up with the traditional object.IOLine property.
Try oDIO1 and see what happens.
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:
No comments:
Post a Comment