1Hz flash so much as working event code.
---------------------------------------------------
Dim BLINK As New oEvent
Dim WIRE As New oWire
Dim led7 As New oLED
Dim led5 As New oLED
Dim flag As New oByte
Sub Main()
flag = 0
ooPIC.Delay = 500
led5.IOLine = 5
led5.TurnOn
led7.IOLine = 7
WIRE.Input.Link(ooPIC.Hz1)
WIRE.Output.Link(BLINK)
WIRE.Operate = cvTrue
End Sub
Sub BLINK_Code()
If flag = 1 Then
led7.TurnOn
flag = 0
Else
led7.TurnOff
flag = 1
End If
End Sub
----------------------------------------------
If this code doesn't work for you then your ooPIC is broken. If, as you
say you read more than 5V on your IO pins, then quite possibly you may
have broken something. The ooPICs are designed for 5V max on their IO
lines. Make sure that you are feeding power into the ooPIC C board at
the Vin line, not the Vdd/5V line. Only 5V can be fed into the 5V pin.
DLC
dldlhfd@aol.com wrote:
> c 1.1 +, v 6.1.1 compiler, oopic C carrier board (IMG D-9 94v-0 0442)
> My whole attempt with that program was to actually see the event program
> work. I have not accomplished that yet. I tried changing the delay to 500 as
> you suggested, the same results. I tried the program that you sent in your
> response and again with no wires attached to my board it still does the same
> thing the red led never comes on. the green led blinks on about a 5 second
> interval and eventually goes out and stays our, without running the subroutine.
> so far the controller has worked as expected except for events. It runs
> my robot just fine if I replace the events with To Do loops it works. Is it
> possible that the events have quit working on this board/compiler/chip and
> every thing else works?
[snip]
--
===================================================
Dennis Clark ooPIC Technical Support
===================================================
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