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.

Tuesday, July 31, 2007

[oopic] Re: Wireless modules and OOPic

--- In oopic@yahoogroups.com, "l.gartner" <l.gartner@...> wrote:
>
> I am looking to buy either the WCM+ or FWCM by Totalrobots but they
> don't have any. Does anyone know where I can get these from, I'm in
> Ohio ?
>
> Also I have noticed on their website that they have a GPS unit, has
> anybody had experience of using this with the OOPic ?
>
> Lloyd
>


I don't know about the modules mentioned, but the ZiRF-Link modules
might do what you need. They work good with oopics, for general comms
and program downloads.

http://www.oricomtech.com/prod3/zirflink.htm


- dan michaels
www.oricomtech.com
--- OOBOT40 Boards ---
=========================


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/

Re: [oopic] Re: Silly question (first of many)

What's not working?

DLC

jueysmum wrote:
> What I'm trying to do is time an event in seconds, then (eventually)
> write it to an array so that it can be repeated (or modified) at a
> later time. This bit is just to get the time 'measured'.
>
> --- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...>
> wrote:
>
>>Maybe because the event is called every second and outside of the
>
> event
>
>>it may not be called? Without seeing what you are trying to
>
> explain I
>
>>don't really have a clear idea of the problem.
>>
>>DLC
>>
>>jueysmum wrote:
>>
>>>Hi
>>>In the following code, if I move the if construct outside of the
>>>event handling code, the robot will not stop. If I leave it in
>
> it
>
>>>will. I've done a few further experiments with the code for the
>>>value of counter - some will work outside the event handler,
>
> some
>
>>>won't why is this? Counter is a global variable so why the
>>>difference?
>>>
>>>Dim LeftServo as New oServoX
>>>Dim RightServo as New oServoX
>>>
>>>
>>>Dim CountAdd as New oEvent
>>>Dim Wire as New oWire
>>>Dim RightWire as New oWire
>>>Dim ScreamWire as New oWire
>>>
>>>Dim Scream as New oFreq
>>>
>>>Dim Counter as New oByte
>>>
>>>Sub Main()
>>>
>>> LeftServo.IOLine = 29
>>> RightServo.IOLine = 30
>>> RightServo.InvertOut = cvTrue
>>>
>>> LeftServo.Value = 127
>>> RightServo.Value = 127
>>>
>>> Counter.Value = 0
>>>
>>>
>>>LeftServo.Operate = cvTrue
>>>RightServo.Operate = cvTrue
>>>Wire.Input.Link(OOpic.hz1)
>>>Wire.Output.Link(CountAdd.operate)
>>>Wire.Operate = cvtrue
>>>Scream.Value = 61473
>>> End Sub
>>>
>>>sub CountAdd_CODE()
>>>Counter.inc
>>>Scream.operate = cvtrue
>>>Oopic.delay = 10
>>>Scream.operate = cvfalse
>>>if Counter.value >5 then
>>>RightServo.Operate= cvFalse
>>>LeftServo.Operate = cvFalse
>>>end if
>>>end sub
>>>
>>>Jueysmum
>>>
>>>
>>>
>>>
>>>Yahoo! Groups Links
>>>
>>>
>>>
>>
>>--
>>------------------------------------------------------
>>Dennis Clark ooPIC Tech Support
>>www.oopic.com
>>------------------------------------------------------
>>
>
>
>
>
>
>
> 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/

[oopic] Re: Silly question (first of many)

--- In oopic@yahoogroups.com, "jueysmum" <c9403328@...> wrote:
>
> What I'm trying to do is time an event in seconds, then (eventually)
> write it to an array so that it can be repeated (or modified) at a
> later time. This bit is just to get the time 'measured'.

Is there a question here? Did you try putting the 'if' statement
inside a 'do ... loop' construct in sub main()?

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:

http://docs.yahoo.com/info/terms/

Re: [oopic] Wireless modules and OOPic

They MAKE them!

Look into the Maxstream XBee units instead then. The XBee modules are quite a bit cheaper and pretty easy to use.

DLC

ooPIC Tech Support

-----Original Message-----

From: "l.gartner" <l.gartner@yahoo.com>
Subj: [oopic] Wireless modules and OOPic
Date: Tue Jul 31, 2007 2:20 pm
Size: 855 bytes
To: oopic@yahoogroups.com

I am looking to buy either the WCM+ or FWCM by Totalrobots but they
don't have any. Does anyone know where I can get these from, I'm in
Ohio ?

Also I have noticed on their website that they have a GPS unit, has
anybody had experience of using this with the OOPic ?

Lloyd


Yahoo! Groups Links



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/

[oopic] Wireless modules and OOPic

I am looking to buy either the WCM+ or FWCM by Totalrobots but they
don't have any. Does anyone know where I can get these from, I'm in
Ohio ?

Also I have noticed on their website that they have a GPS unit, has
anybody had experience of using this with the OOPic ?

Lloyd


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/

[oopic] Re: Silly question (first of many)

What I'm trying to do is time an event in seconds, then (eventually)
write it to an array so that it can be repeated (or modified) at a
later time. This bit is just to get the time 'measured'.

--- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...>
wrote:
>
> Maybe because the event is called every second and outside of the
event
> it may not be called? Without seeing what you are trying to
explain I
> don't really have a clear idea of the problem.
>
> DLC
>
> jueysmum wrote:
> > Hi
> > In the following code, if I move the if construct outside of the
> > event handling code, the robot will not stop. If I leave it in
it
> > will. I've done a few further experiments with the code for the
> > value of counter - some will work outside the event handler,
some
> > won't why is this? Counter is a global variable so why the
> > difference?
> >
> > Dim LeftServo as New oServoX
> > Dim RightServo as New oServoX
> >
> >
> > Dim CountAdd as New oEvent
> > Dim Wire as New oWire
> > Dim RightWire as New oWire
> > Dim ScreamWire as New oWire
> >
> > Dim Scream as New oFreq
> >
> > Dim Counter as New oByte
> >
> > Sub Main()
> >
> > LeftServo.IOLine = 29
> > RightServo.IOLine = 30
> > RightServo.InvertOut = cvTrue
> >
> > LeftServo.Value = 127
> > RightServo.Value = 127
> >
> > Counter.Value = 0
> >
> >
> > LeftServo.Operate = cvTrue
> > RightServo.Operate = cvTrue
> > Wire.Input.Link(OOpic.hz1)
> > Wire.Output.Link(CountAdd.operate)
> > Wire.Operate = cvtrue
> > Scream.Value = 61473
> > End Sub
> >
> > sub CountAdd_CODE()
> > Counter.inc
> > Scream.operate = cvtrue
> > Oopic.delay = 10
> > Scream.operate = cvfalse
> > if Counter.value >5 then
> > RightServo.Operate= cvFalse
> > LeftServo.Operate = cvFalse
> > end if
> > end sub
> >
> > Jueysmum
> >
> >
> >
> >
> > 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/

Monday, July 30, 2007

Re: [oopic] New ooPIC C.1 and compiler

That is the FIRST question that I have!

DLC

Andrew Porrett wrote:
> At 07:24 PM 7/30/2007, ooPIC Tech Support wrote:
>
>> Anyone with a working ooPIC of
>>any version can send the chip in for a free firmware upgrade, a $10 S&H
>>fee will be charged to handle cost for burning a new chip for you.
>
>
> So if I scrape the PICs off my R boards, I can get new SMT PICs?
>
>
> ...Andy
>
>
>
>
>
> 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/

[oopic] Thank you - Has Anyone handled this issue - before

Thank you, all for your help this array of byte works best, I'm
currently using version 6.0 so this will solve my problem...


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/

[oopic] Re: Silly question (first of many)

--- In oopic@yahoogroups.com, "jueysmum" <c9403328@...> wrote:
>
> Hi
> In the following code, if I move the if construct outside of the
> event handling code, the robot will not stop. If I leave it in it
> will. I've done a few further experiments with the code for the
> value of counter - some will work outside the event handler, some
> won't why is this? Counter is a global variable so why the
> difference?
>
> Dim LeftServo as New oServoX
> Dim RightServo as New oServoX
>
>
> Dim CountAdd as New oEvent
> Dim Wire as New oWire
> Dim RightWire as New oWire
> Dim ScreamWire as New oWire
>
> Dim Scream as New oFreq
>
> Dim Counter as New oByte
>
> Sub Main()
>
> LeftServo.IOLine = 29
> RightServo.IOLine = 30
> RightServo.InvertOut = cvTrue
>
> LeftServo.Value = 127
> RightServo.Value = 127
>
> Counter.Value = 0
>
>
> LeftServo.Operate = cvTrue
> RightServo.Operate = cvTrue
> Wire.Input.Link(OOpic.hz1)
> Wire.Output.Link(CountAdd.operate)
> Wire.Operate = cvtrue
> Scream.Value = 61473
> End Sub
>
> sub CountAdd_CODE()
> Counter.inc
> Scream.operate = cvtrue
> Oopic.delay = 10
> Scream.operate = cvfalse
> if Counter.value >5 then
> RightServo.Operate= cvFalse
> LeftServo.Operate = cvFalse
> end if
> end sub
>
> Jueysmum
>


You should be able to move the 'if Counter.value ...' outside of the
event code but you do have to put it in a loop.

Do

...
if Counter.value ...
...

Loop

There is no implied loop when you get to the end of sub Main() -
processing of the script is finished. Virtual circuits and event code
continues indefinitely.

You really don't want script code in a loop if you can avoid it.
Executing code is not particularly fast on the OOPic.

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:

http://docs.yahoo.com/info/terms/

Re: [oopic] New ooPIC C.1 and compiler

At 07:24 PM 7/30/2007, ooPIC Tech Support wrote:
> Anyone with a working ooPIC of
>any version can send the chip in for a free firmware upgrade, a $10 S&H
>fee will be charged to handle cost for burning a new chip for you.

So if I scrape the PICs off my R boards, I can get new SMT PICs?


...Andy



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/

Re: [oopic] Silly question (first of many)

Show us the code that doesn't work.

At 06:23 PM 7/30/2007, jueysmum wrote:
>Hi
>In the following code, if I move the if construct outside of the
>event handling code, the robot will not stop. If I leave it in it
>will. I've done a few further experiments with the code for the
>value of counter - some will work outside the event handler, some
>won't why is this? Counter is a global variable so why the
>difference?
>
>Dim LeftServo as New oServoX
>Dim RightServo as New oServoX
>
>
>Dim CountAdd as New oEvent
>Dim Wire as New oWire
>Dim RightWire as New oWire
>Dim ScreamWire as New oWire
>
>Dim Scream as New oFreq
>
>Dim Counter as New oByte
>
>Sub Main()
>
> LeftServo.IOLine = 29
> RightServo.IOLine = 30
> RightServo.InvertOut = cvTrue
>
> LeftServo.Value = 127
> RightServo.Value = 127
>
> Counter.Value = 0
>
>
>LeftServo.Operate = cvTrue
>RightServo.Operate = cvTrue
>Wire.Input.Link(OOpic.hz1)
>Wire.Output.Link(CountAdd.operate)
>Wire.Operate = cvtrue
>Scream.Value = 61473
> End Sub
>
>sub CountAdd_CODE()
>Counter.inc
>Scream.operate = cvtrue
>Oopic.delay = 10
>Scream.operate = cvfalse
>if Counter.value >5 then
>RightServo.Operate= cvFalse
>LeftServo.Operate = cvFalse
>end if
>end sub
>
>Jueysmum



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/

[oopic] New ooPIC C.1 and compiler

Hello,

The wait will soon be over. The ooPIC V.6 compiler releases on
August 1st. A new programming interface and many bug fixes are the best
reasons to move to V.6. The next good reason is that the ooPIC C.1.1
firmware releases on August 1 as well. Anyone with a working ooPIC of
any version can send the chip in for a free firmware upgrade, a $10 S&H
fee will be charged to handle cost for burning a new chip for you.

Because the C.1 firmware will allow you to assign one of your PWM
channels to a high precision pulse timer (read: RC receiver signals)
Savage Innovations is also offering the VEX transmitter/receiver set for
$130 until they run out. The VEX receiver's output is not to individual
servos but is the entire 6 channel servo train so that with that one
ooPIC timing line you can read up to 6 servos worth of receiver
information.

I will post more details on the upgrade process and how to order the
VEX transmitter/receiver devices as I get it. This announcement is "hot
off of the presses" from Savage Innovations.

DLC
--
------------------------------------------------------
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/

Re: [oopic] Silly question (first of many)

Maybe because the event is called every second and outside of the event
it may not be called? Without seeing what you are trying to explain I
don't really have a clear idea of the problem.

DLC

jueysmum wrote:
> Hi
> In the following code, if I move the if construct outside of the
> event handling code, the robot will not stop. If I leave it in it
> will. I've done a few further experiments with the code for the
> value of counter - some will work outside the event handler, some
> won't why is this? Counter is a global variable so why the
> difference?
>
> Dim LeftServo as New oServoX
> Dim RightServo as New oServoX
>
>
> Dim CountAdd as New oEvent
> Dim Wire as New oWire
> Dim RightWire as New oWire
> Dim ScreamWire as New oWire
>
> Dim Scream as New oFreq
>
> Dim Counter as New oByte
>
> Sub Main()
>
> LeftServo.IOLine = 29
> RightServo.IOLine = 30
> RightServo.InvertOut = cvTrue
>
> LeftServo.Value = 127
> RightServo.Value = 127
>
> Counter.Value = 0
>
>
> LeftServo.Operate = cvTrue
> RightServo.Operate = cvTrue
> Wire.Input.Link(OOpic.hz1)
> Wire.Output.Link(CountAdd.operate)
> Wire.Operate = cvtrue
> Scream.Value = 61473
> End Sub
>
> sub CountAdd_CODE()
> Counter.inc
> Scream.operate = cvtrue
> Oopic.delay = 10
> Scream.operate = cvfalse
> if Counter.value >5 then
> RightServo.Operate= cvFalse
> LeftServo.Operate = cvFalse
> end if
> end sub
>
> Jueysmum
>
>
>
>
> 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/

[oopic] Silly question (first of many)

Hi
In the following code, if I move the if construct outside of the
event handling code, the robot will not stop. If I leave it in it
will. I've done a few further experiments with the code for the
value of counter - some will work outside the event handler, some
won't why is this? Counter is a global variable so why the
difference?

Dim LeftServo as New oServoX
Dim RightServo as New oServoX


Dim CountAdd as New oEvent
Dim Wire as New oWire
Dim RightWire as New oWire
Dim ScreamWire as New oWire

Dim Scream as New oFreq

Dim Counter as New oByte

Sub Main()

LeftServo.IOLine = 29
RightServo.IOLine = 30
RightServo.InvertOut = cvTrue

LeftServo.Value = 127
RightServo.Value = 127

Counter.Value = 0


LeftServo.Operate = cvTrue
RightServo.Operate = cvTrue
Wire.Input.Link(OOpic.hz1)
Wire.Output.Link(CountAdd.operate)
Wire.Operate = cvtrue
Scream.Value = 61473
End Sub

sub CountAdd_CODE()
Counter.inc
Scream.operate = cvtrue
Oopic.delay = 10
Scream.operate = cvfalse
if Counter.value >5 then
RightServo.Operate= cvFalse
LeftServo.Operate = cvFalse
end if
end sub

Jueysmum


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/

Re: [oopic] Re: Has anyone handled this issue - before

The V.5 compiler has a bug in nod-object array indexing, however in the V.6 compiler you can also make an array of just BYTE data.

Dim things(6) as BYTE

DDC

ooPIC Tech Support

-----Original Message-----

From: "rtstofer" <rstofer@pacbell.net>
Subj: [oopic] Re: Has anyone handled this issue - before
Date: Mon Jul 30, 2007 9:41 am
Size: 1K
To: oopic@yahoogroups.com

--- In oopic@yahoogroups.com, "Kelly" <kelly4football@...> wrote:
>
> I have an array of 6 pieces of data, and I know I can use the oRam to
> write and read this array, but does anyone know how I can allocate
this
> memory so that I can see that nothing else (other variables) are
going
> to use that space in memory.
>

oRAM is an advanced concept and, AFAIK, the internal use of RAM is not
documented. There are plenty of caution notes that suggest using this
object is a bad idea.

Since you are not looking for persistence, you can simply create an
array of oBytes like:

Dim Things(3) as new oByte
Dim Serial as new oSerialPort

sub main()
Things(1) = 13
Things(2) = 14
Things(3) = 15
If Things(3) - Things(2) + Things(1) = 14 then
Serial.String = "OK" + chr$(10) + chr$(13)
else
Serial.String = "OOPS" + chr$(10) + chr$(13)
end if
Serial.String = STR$(Things(2)) + chr$(10) + chr$(13)
end sub

You can also use oBuffer but it isn't as intuitive as simply creating
an array.

OTOH, every oByte requires 2 bytes of object memory and there are only
86 bytes to start with.

If you do want persistence, try oEEPROM.

Richard



Yahoo! Groups Links



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/

[oopic] Re: Has anyone handled this issue - before

--- In oopic@yahoogroups.com, "Kelly" <kelly4football@...> wrote:
>
> I have an array of 6 pieces of data, and I know I can use the oRam to
> write and read this array, but does anyone know how I can allocate
this
> memory so that I can see that nothing else (other variables) are
going
> to use that space in memory.
>

oRAM is an advanced concept and, AFAIK, the internal use of RAM is not
documented. There are plenty of caution notes that suggest using this
object is a bad idea.

Since you are not looking for persistence, you can simply create an
array of oBytes like:

Dim Things(3) as new oByte
Dim Serial as new oSerialPort

sub main()
Things(1) = 13
Things(2) = 14
Things(3) = 15
If Things(3) - Things(2) + Things(1) = 14 then
Serial.String = "OK" + chr$(10) + chr$(13)
else
Serial.String = "OOPS" + chr$(10) + chr$(13)
end if
Serial.String = STR$(Things(2)) + chr$(10) + chr$(13)
end sub

You can also use oBuffer but it isn't as intuitive as simply creating
an array.

OTOH, every oByte requires 2 bytes of object memory and there are only
86 bytes to start with.

If you do want persistence, try oEEPROM.

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:

http://docs.yahoo.com/info/terms/

[oopic] Has anyone handled this issue - before

I have an array of 6 pieces of data, and I know I can use the oRam to
write and read this array, but does anyone know how I can allocate this
memory so that I can see that nothing else (other variables) are going
to use that space in memory.


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/

Sunday, July 29, 2007

[oopic] Re: Angle of attack VII - any help appreciated

--- In oopic@yahoogroups.com, "Nick Mulder" <nick.mulder@...> wrote:
>
> Hi,
>
> turns out i was mistaken with the locally available chip I linked and
> it didn't have synchronous LOAD after all, but another dig around the
> shops here in New Zealand I found this:
>
> 74LS169 ...
> http://pdfdata.datasheetsite.com/web/59361/74LS168.pdf
>

Looks right! CEP' and CET' need to be '0', decode Q3 NAND Q2 and
connect to PE', U/D' needs to be '1'.

Use the PE' signal (output of NAND) to clock a 74LS74 with the D input
connected to its' own Q' output. This will toggle the flop every time
the PE' signal goes high which is when the count is set to either 0 or 1.

Apply '0' to P1, P2, P3 and apply the Q output of the flop to P0.

It should work!

Don't worry about having a bunch of 'not currently required' chips.
They will come in handy some day.

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:

http://docs.yahoo.com/info/terms/

Re: [oopic] Re: Angle of attack VII - any help appreciated

Hi,

turns out i was mistaken with the locally available chip I linked and
it didn't have synchronous LOAD after all, but another dig around the
shops here in New Zealand I found this:

74LS169 ...
http://pdfdata.datasheetsite.com/web/59361/74LS168.pdf

It seems to be the same deal but uses different names for things, I
just want to make sure its the right thing before I order it (and a
bunch of other stuff from the same place...)

As I understand it PE is the same as LOAD ? If it is different I
imagine there probably is a similar cct setup with this chip that
could achieve the same ends as those already talked about ?

I have a large collection here of chips bought on a whim that turned
out to be redundant or under/over spec through lack of
research/understanding - trying to cut down!

thanks as always for the help so far ;)

nick



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/

Friday, July 27, 2007

[oopic] too great

Took me just 2 weeks to get my accredited Masters in this course. Already in
line for an interview on monday to hopefully get a better position within the
place I work at. Didn't even have to buy and books, go to any classes, or take
any exams. Honestly, if anyone here is looking to move up in this world and get
something like I did I suggest you use the same people I did; here is the
details 1-770 621 2634


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/

Thursday, July 26, 2007

Re: [oopic] about windows vista

Stick with XP. Scott is working on a Vista install.

DLC

jim wrote:
> I wanted to know if version 6 works with windows vista? Are they
> compatible? Or should I stick with xp.
>
>
>
>
> 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/

[oopic] about windows vista

I wanted to know if version 6 works with windows vista? Are they
compatible? Or should I stick with xp.


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/

[oopic] Just got it

Just got my BS and i wasnt even required to turn up! Just called these people
770 621-2634, filled out a few forms and a bit of paperwork and was accredited
within 3 weeks at an internationally recognised Uni! How good is that!


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/

[oopic] Re: Simple OOpic logic(?)

--- In oopic@yahoogroups.com, "oldseeldog" <oldseeldog@...> wrote:
>
>
> Here's the code that doesn't work. The AND and Flip-Flop work
> individually, but when put together the flip-flop output goes to the
> state that should be triggered when iscabledown is high.
>
> Dim motion as New oDio1
> Dim isCableUp as New oDio1
> Dim isCableDown as New oDio1
> Dim cableDown as New oDio1
>
> Dim FF As New oFlipFlop
> Dim andGate As New oGate(2)
>
> Sub Main()
> Call init
> andGate.Input1.Link(motion)
> andGate.InvertIn1 = cvTrue
> andGate.Input2.Link(isCableUp)
> andGate.InvertIn2 = cvTrue
> andGate.InvertOut = cvTrue
> andGate.Operate = cvTrue
> andGate.Output.Link(FF)
>
> FF.Input1.Link(andGate)
> FF.Input2.Link(isCableDown)
> FF.Output.Link(cableDown)
> FF.Operate = cvTrue
> End Sub
>
> Sub init()
>
> motion.IOLine = 5
> motion.Direction = cvInput
>
> isCableUp.IOLine = 6
> isCableUp.Direction = cvInput
>
> isCableDown.IOLine = 8
> isCableDown.Direction = cvInput
>
> cableDown.IOLine = 7
> cableDown.Direction = cvOutput
>
> End Sub
>

Assuming your inputs are positive true, the AND function should work:

(A' OR B')' = A AND B <= ok

But I think you need an oWire between andGate.Output.Link and
FF.Input1.Link.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Simple OOpic logic(?)

Here's the code that doesn't work. The AND and Flip-Flop work
individually, but when put together the flip-flop output goes to the
state that should be triggered when iscabledown is high.

Dim motion as New oDio1
Dim isCableUp as New oDio1
Dim isCableDown as New oDio1
Dim cableDown as New oDio1

Dim FF As New oFlipFlop
Dim andGate As New oGate(2)

Sub Main()
Call init
andGate.Input1.Link(motion)
andGate.InvertIn1 = cvTrue
andGate.Input2.Link(isCableUp)
andGate.InvertIn2 = cvTrue
andGate.InvertOut = cvTrue
andGate.Operate = cvTrue
andGate.Output.Link(FF)

FF.Input1.Link(andGate)
FF.Input2.Link(isCableDown)
FF.Output.Link(cableDown)
FF.Operate = cvTrue
End Sub

Sub init()

motion.IOLine = 5
motion.Direction = cvInput

isCableUp.IOLine = 6
isCableUp.Direction = cvInput

isCableDown.IOLine = 8
isCableDown.Direction = cvInput

cableDown.IOLine = 7
cableDown.Direction = cvOutput

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/

Wednesday, July 25, 2007

Re: [oopic] Problem using Parallax Ping ultrasonic sensor with ooPic-R

It could be that your code is just too slow. What you have written does
not take advantage of the ooPIC in high speed mode and will have
terrible resolution. The ooPIC book shows how to trigger and disable
the oTimer to get a SONAR timing. You'll need to do this here as well.
Because the Ping is designed for the Parallax Stamp it really doesn't
work all that well on the ooPIC since you have to switch an IO line from
output to input, which is very slow in ooPIC scripting.

I haven't tried this, but you might be able to switch an ooPIC IOline
from input to output using a oWire, but I'm not sure since I don't know
if .Direction is a linkable flag. Try it and see, I'll experiment with
that as well.

Next, I recommend that you put a pullup resistor on the IOline to the
Ping so that when you flip it to be an input it will automatically pull
high initiating a SONAR ping. In this way you can start the ping and be
ready to look for a low value on the IOline by just setting .Direction =
cvInput.

Next I strongly recommend that to get any kind of useful timing
information that you make sure that the oTimer object is linked to the
virtual circuit and NOT done as a script language loop. See how this is
done in the book for the SRF04 SONAR, it will be very similar.

DLC

robotxro wrote:
> Hello group,
>
> I have a robot based on a ER1 kit and I have added a ooPic-R
> microcontroller to controll a 6DOF arm with servos and a pan/tilt
> head for the camera. On the head I have mounted a Ping ultrasonic
> range sensor made by Parallax and an Eltec PIR sensor. I also have a
> Devantech compass sensor on the I2C interface. Another 3 Ping
> sensors will be added to the ooPic-R. The project is a couple years
> old but set aside for some reason. Now I'm trying to revive it but
> run into some problems.
>
> The problem I have is making the Ping sonar to do it's job. Since it
> doesn't have a specific object defined, I have adapted the code
> found in Dennis Clark's book (Programming and customising the ooPic
> microcontroller - realy nice book!) for the older ooPic
> microcontrollers, but it does not work for some reason. Here is the
> test code, please take a look and let me know what can I do to make
> it work. I am reading the CamValue from serial port using SCP
> commands on my computer, but is allways 0 and the sonar's activity
> LED does not turn on at all. With my multimeter I get a voltage of
> 0.3 volts on the signal line from time to time.
>
> Dim Tics As New oTimer ' Create the sonar timer
> Dim Son0 As New oDIO1 ' Create the camera sonar line
> Dim conn0 As New oWire ' Create the wire link
> Dim CamValue As New oWord ' Camera sonar distance
> '
> Sub Main()
> ooPIC.Snode = 1
> Call Setup()
> ooPIC.Delay = 100
> Do
> Call ReadSonar()
> ooPIC.Delay = 150
> Loop
> End Sub
> '
> '
> Sub Setup() ' Setup the compass, servos, eltec...
> Tics.PreScale = 2
> Tics.Operate = cvFalse
> Tics = 0
> Son0.IOLine = 1
> Son0.Direction = cvOutput
> Son0 = cvLow
> conn0.Input. Link(Son0. State)
> conn0.Output. Link(Tics. Operate)
> conn0.Operate = cvFalse
> End Sub
> '
> Sub ReadSonar()
> Tics = 0
> Son0.Direction = cvOutput
> Son0 = cvHigh
> Son0 = cvLow
> Son0.Direction = cvInput
> conn0.Operate = cvTrue
> Do 1 Times: Loop
> While Son0 = cvHigh
> Wend
> CamValue = Tics/470 ' Get the distance in cm
> conn0.Operate = cvFalse
> End Sub
>
--
------------------------------------------------------
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/

Re: [oopic] Simple OOpic logic(?)

Can you post your code?

DLC

oldseeldog wrote:
> This seems simple enough but I can't get it to work - maybe someone
> can help... I have 3 switch inputs (A,B,C) and one latched output. It
> seems an AND gate (oGate)and a Flip Flop (oFlipFlop) should do it. The
> logic is this:
>
> If A AND B are high, the Flip Flop latches to one state (output high).
> If input C is high, the Flip Flop output is latched to low.
>
> The inputs to the AND gate are momentary and the link to the Filp Flop
> sets its output as it should, but the second Flip Flop input (switch
> C, also momentary) won't reset the the Flip Flop to its low state.
>
> Individually the AND (made from a oGate object)works as it should, as
> does the oFlipFlop.
>
> As I said, it should be simple, but so far it isn't. Any help will be
> appreciated.
>
>
>
>
> 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/

[oopic] Re: Problem using Parallax Ping ultrasonic sensor with ooPic-R

Have you tried PingTest.osc from the Files section? I haven't looked
at it but it might help you get started.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Simple OOpic logic(?)

--- In oopic@yahoogroups.com, "oldseeldog" <oldseeldog@...> wrote:
>
> This seems simple enough but I can't get it to work - maybe someone
> can help... I have 3 switch inputs (A,B,C) and one latched output. It
> seems an AND gate (oGate)and a Flip Flop (oFlipFlop) should do it. The
> logic is this:
>
> If A AND B are high, the Flip Flop latches to one state (output high).
> If input C is high, the Flip Flop output is latched to low.
>
> The inputs to the AND gate are momentary and the link to the Filp Flop
> sets its output as it should, but the second Flip Flop input (switch
> C, also momentary) won't reset the the Flip Flop to its low state.
>
> Individually the AND (made from a oGate object)works as it should, as
> does the oFlipFlop.
>
> As I said, it should be simple, but so far it isn't. Any help will be
> appreciated.
>

You should probably post your code. The example code for the
oFlipFlop object does what you want with the exception of ANDing the
two inputs.

Another thought: I don't know how you have arranged your inputs.
Normally, they are '1' and pulled to '0' by the button. Make sure
your AND gate really goes to '0' when the buttons aren't activated.
The flop evaluates Input1 first and if it is a '1', the flop is set
and Input2 is not evaluated. Input1 must be a '0' before Input2 is
considered.

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:

http://docs.yahoo.com/info/terms/

[oopic] Problem using Parallax Ping ultrasonic sensor with ooPic-R

Hello group,

I have a robot based on a ER1 kit and I have added a ooPic-R
microcontroller to controll a 6DOF arm with servos and a pan/tilt
head for the camera. On the head I have mounted a Ping ultrasonic
range sensor made by Parallax and an Eltec PIR sensor. I also have a
Devantech compass sensor on the I2C interface. Another 3 Ping
sensors will be added to the ooPic-R. The project is a couple years
old but set aside for some reason. Now I'm trying to revive it but
run into some problems.

The problem I have is making the Ping sonar to do it's job. Since it
doesn't have a specific object defined, I have adapted the code
found in Dennis Clark's book (Programming and customising the ooPic
microcontroller - realy nice book!) for the older ooPic
microcontrollers, but it does not work for some reason. Here is the
test code, please take a look and let me know what can I do to make
it work. I am reading the CamValue from serial port using SCP
commands on my computer, but is allways 0 and the sonar's activity
LED does not turn on at all. With my multimeter I get a voltage of
0.3 volts on the signal line from time to time.

Dim Tics As New oTimer ' Create the sonar timer
Dim Son0 As New oDIO1 ' Create the camera sonar line
Dim conn0 As New oWire ' Create the wire link
Dim CamValue As New oWord ' Camera sonar distance
'
Sub Main()
ooPIC.Snode = 1
Call Setup()
ooPIC.Delay = 100
Do
Call ReadSonar()
ooPIC.Delay = 150
Loop
End Sub
'
'
Sub Setup() ' Setup the compass, servos, eltec...
Tics.PreScale = 2
Tics.Operate = cvFalse
Tics = 0
Son0.IOLine = 1
Son0.Direction = cvOutput
Son0 = cvLow
conn0.Input. Link(Son0. State)
conn0.Output. Link(Tics. Operate)
conn0.Operate = cvFalse
End Sub
'
Sub ReadSonar()
Tics = 0
Son0.Direction = cvOutput
Son0 = cvHigh
Son0 = cvLow
Son0.Direction = cvInput
conn0.Operate = cvTrue
Do 1 Times: Loop
While Son0 = cvHigh
Wend
CamValue = Tics/470 ' Get the distance in cm
conn0.Operate = cvFalse
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/

[oopic] Simple OOpic logic(?)

This seems simple enough but I can't get it to work - maybe someone
can help... I have 3 switch inputs (A,B,C) and one latched output. It
seems an AND gate (oGate)and a Flip Flop (oFlipFlop) should do it. The
logic is this:

If A AND B are high, the Flip Flop latches to one state (output high).
If input C is high, the Flip Flop output is latched to low.

The inputs to the AND gate are momentary and the link to the Filp Flop
sets its output as it should, but the second Flip Flop input (switch
C, also momentary) won't reset the the Flip Flop to its low state.

Individually the AND (made from a oGate object)works as it should, as
does the oFlipFlop.

As I said, it should be simple, but so far it isn't. Any help will be
appreciated.


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/

Sunday, July 22, 2007

[oopic] Re: Angle of attack VII - any help appreciated

--- In oopic@yahoogroups.com, "Dennis K. Deckmann" <dkdeckmann@...> wrote:
>
> What sort of tools would you recomend for the budding "siliconsmith",

I use the FREE WebPACK ISE available for download from Xilinx although
I usually buy a backup CD for < $10.

Altera has a similar offering but I wasn't as happy with their
licensing. They reserved the right to pull back the license at any
time. It reminded my of UCSD pulling the licenses to my UCSD Pascal
software.

> I am completely ignorant on CPLDs and FPGAs?

CPLDs are the 'glue' of logic circuits. They are easily used to
create small scale circuits such as address decoders, some types of
memory chip select or other simple functions. Like this counter thing...

FPGAs are much larger in scale and usually include blocks of static
ram as well as chunks of distributed ram which is much smaller. A
million gates is not unusal.

I recently 'built' an entire IBM 1130 minicomputer in a single million
gate FPGA and only used about 1/3 of the gates. It works! It runs
the entire IBM disk operating system, macro assembler and 27 pass
Fortran compiler!

>
> Are any of them usable on my "legacy" '95 or '98 systems?

No, and the execution speed is grim on a 1.2 GHz Celeron. It gets a
lot better on a dual-core 3.8 GHz machine. Unfortunately, the
dual-core machine has Linux and, in my view only, the Linux version of
the WebPACK ISE doesn't seem to function very well. That could also
be because I don't know a lot about Linux. The only reason I keep my
WinXP machine is for ISE and PIC programming.

>
> Are the "blanks" cost competetive with discrete logic for such small-
> scale projects?


A 5V version of the XC9572XL in a PLCC-44 package costs $3.40 at
Digikey. It can easily replace a dozen or more discrete chips so, in
that regard, they are cost and space competitive.

It's better than that: with discrete chips you better have the design
correct before you start wire-wrapping. With the CPLD (or FPGA), you
can rethink the circuit until you get just what you want.

And it helps to have a logic analyzer. I built one from a Spartan 3
Starter Board using the design here:
http://www.sump.org/projects/analyzer/

>
> Thru-hole parts available?

I don't know. I kind of doubt it. However, the PLCC package goes in
a PLCC socket which is through-hole mounted. There are a lot of
devices with pins even though they are surface mount. That's good
because the BGA packages are out of the question.

There are a lot of development boards at www.digilentinc.com.

I
particularly like the Spartan 3 Starter Board (I have 3), especially
the 1M gate version. I also have the XC2XL CPLD board and a bunch of
their add-on modules.

Soldering SMT isn't very hard and it is becoming a requirement of
being in this hobby. I use the 'drag' method shown here:
http://www.howardelectronics.com/jbc/dragsoldering.wmv

I haven't
tried a 208 pin Spartan IIE FPGA but I would like to. The trick is
using a LOT of flux and not much solder.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Angle of attack VII - any help appreciated

What sort of tools would you recomend for the budding "siliconsmith",
I am completely ignorant on CPLDs and FPGAs?

Are any of them usable on my "legacy" '95 or '98 systems?

Are the "blanks" cost competetive with discrete logic for such small-
scale projects?

Thru-hole parts available?

--- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> I haven't thought about discrete counters in a very long time. It
is
> so much easier to build a synchronous counter in a CPLD or FPGA. A
> very few lines of code and its done! Let the synthesis tool do all
> the grunt work! When you have 1M gates in a single package almost
> anything is possible.
>
> 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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Sin and Cos Functions

I understand some of the confusion. Your figure 4-4 explains what one
might expect from the ooPIC. I would expect otherwise... Is the
figure correct?

I'm sure there is some reason for the ooPIC producing the results you
depict, perhaps to reduce computational overhead within the ooPIC or
to allow for a smoother interface with the rest of the robotic
control functions...

I understand that the sin function does not use signed math so the
output has been scaled to fit integers 0 to 255, and a circle has
been divided into 256 units, not 360...

I would expect 0 input to give mid-scale output, which the ooPIC
does - 127.

I would expect math where 90 degrees, 64 input units, would give full-
scale result not bottom-scale, so full-scale would give 255 as a
result - the ooPIC gives 0.

I would expect values between 0 and 90 degrees, 0 to 64 units, to
give results between mid-scale and full-scale - the ooPIC gives
results between mid-scale and bottom-scale.

180 degrees would be midscale, the ooPIC gives 127 which is midscale
for 0 to 255, which would be correct.

I would expect 270 degrees to give bottom-scale - the ooPIC gives 255
which is full-scale...

It appears the ooPIC math is "upsidedown" from what I would expect...

--- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...>
wrote:
>
> What part needs explanation? Remember that the outputs of these
> functions are in BRADs, or Binary RADians. A BRAD is the number
which
> over 255 is the fraction of the radian represented. This was a way
to
> represent the 2PI radians with a single byte instead of a whole
word
> which would be needed if 360 degrees were used. The resolution is
much
> lower than with 360 degrees (2PI radians), but more convenient to
use.
> Also, the n returns, which represents n/255 is used because the
ooPIC
> does not do non-integer math.
>
> DLC
>
> samitharansara wrote:
> > Are there any computational errors within the oopic, when
executing
> > these type of functions ? Can someone explain it please.
> >
> >
> >
> >
> > 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/

[oopic] Re: oDcmotor, oJoystick, and speed ramping

The 45 degree rotation should do what you are looking for even with
pushbutton type joysticks.

Moving the stick to 12 o'clock gives FF (both channels forward), 6
o'clock gives RR (both channels reverse).

9 o'clock gives RF (left reverse with right forward - spin left), 3
o'clock gives FR (left forward with right reverse - spin right).

1:30 gives FS (left forward with right stop - locked right wheel turn
right), etc...

With the button joystick you can get 9 combinations...

(F)orward, (R)everse, (S)top
-- -- FF -- --
-- SF -- FS --
RF -- SS -- FR
-- RS -- SR --
-- -- RR -- --

--- In oopic@yahoogroups.com, "Travis Swaim" <cheeto4493@...> wrote:
>
> I thought of rotating the stick, but it is a cheap remote, and the
> joystick just pushes buttons on the circuit board, so no-go.
>
> --- In oopic@yahoogroups.com, <dennis.clark@> wrote:
> >
> > You can use oMath to scale between oNavcon and your joystick
values.
> >
> > Another fun fact. If you have a transmitter with 2 sticks you can
> open it up and rotate the joystick insert to get back to tank
steering.
> >
> > DLC
> >
> > ooPIC Tech 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:

http://docs.yahoo.com/info/terms/

Saturday, July 21, 2007

[oopic] Re: Angle of attack VII - any help appreciated

A more interesting solution uses a small CPLD. I have a development
board with a 44 pin Xilinx XC9572XL device so I created the circuit. A
single 4 bit loadable counter, an AND gate and a D flop take less than
10% of the macrocells. This leaves a lot of logic left for other
things.

FWIW, the chip is about the size of a dime. This particular device
uses 3.3V logic levels which can be a PITA. There is a regular XC9572
device for 5V logic and it is available in a PLCC 44 package. About
the size of a quarter.

I don't spend near enough quality time with my CPLDs and FPGAs. It was
an interesting diversion.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Angle of attack VII - any help appreciated

> erm, could you just ground LOAD and have A,B,C,D all grounded as well
> to achieve the same as CLR ?
>
> Just a quick question to help lubricate my understanding !
>

Yes, if you have a synchronous LOAD then you can load 0 or any other
value.

Now, the trick is to use that synchronous LOAD to load a value other
than 0 and change the length of the count sequence to either 12 or 13.

If the counter is loaded with 0 then the sequence is 0..12: 13 counts.
When it is loaded with 1 the sequence is 1..12: 12 counts.

To decide whether to load 0 or 1, we need to keep track of the number
of LOAD pulses. That's where the D flop comes in. Every LOAD pulse
toggles the flop which, because the D input comes from the Q' output,
simply changes state on each pulse. As a result, the Q output will
toggle between 0 and 1 every time through the sequence. First it
provides 0 to load the counter, the next time it provides 1.

A single 4 bit counter is adequate for the counting scheme as long as
the start value can be changed. It never needs to count to 25, it
only needs to count to 12 or 13.

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:

http://docs.yahoo.com/info/terms/

Re: [oopic] Re: Angle of attack VII - any help appreciated

ah hah - yep I think I get what you mean ... I'll search for a proper
4-bit counter a bit harder as locally there is only that BCD one I've
found so far ... Unless as I understand it the second chip I linked
(the Asynchronous Clear SN54HC193/SN74HC193) is fine ? So we wouldn't
use CLR in the scheme you outlined huh - as in LOAD is 'synchronous'
or doesn't cause timing issues ?

erm, could you just ground LOAD and have A,B,C,D all grounded as well
to achieve the same as CLR ?

Just a quick question to help lubricate my understanding !

thanks ;)
Nick


On 7/21/07, rtstofer <rstofer@pacbell.net> wrote:
> --- In oopic@yahoogroups.com, "Nick Mulder" <nick.mulder@...> wrote:
> >
> > Okidoki,
> >
> > Locally (and cheaply) I can get the 74HC160 Synchronous Decimal
> > Up/Down Counter - http://www.jaycar.co.nz/products_uploaded/ZC4855.pdf
> > - It seems to be the same chip aside from the fact it is BCD and not
> > the full 2^4 bits
>
> Better check page 2 of 12 where it states that the Clear input is
> asynchronous. However, the Load' input is synchronous. All you have
> to do is load a value of 0.
>
> >
> > Now if I'm understanding correctly it should work fine but I need a
> > different setup of logic doohickeys for the reset and 13th(12th)
> > outputs ?
> >
> > Either that or maybe:
> > http://www.jaycar.co.nz/products_uploaded/ZC4864.pdf - which is a
> > different beast but in the same ballpark ?
>
> Again, this chip also has asynchronous clear. Unfortunately, it also
> has asynchronous load.
>
>
>
> Since you only want an output every 12 or 13 pulses, you can use a
> single counter (74HC163) and a D flop such as the 74HC74. What we can
> do is count 1..12 (12 count) or 0..12 (13 count). We generate the
> LOAD' (PE') signal by NANDing Q3 and Q2 (12). We ground the D3, D2 &
> D1 inputs and connect the D0 input to the Q output of a D flop. The D
> input of the D flop is the Q' output of the flop and the clock is the
> LOAD' signal.
>
> Assume the D flop is reset. The Q output is 0 so when the counter
> reaches 12, the counter will load with 0 and the D flop will toggle.
> When the counter reaches 12 (13 clocks later) the Q output will be one
> and the counter will load with 1. The Q output of the D flop will
> toggle back to 0 so that 12 clocks (counts 1..12) later the counter
> will be loaded with 0 again.
>
> Richard
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>



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/

Friday, July 20, 2007

Re: [oopic] Re: HSR 5995TG and oPWMS

Use the oServo objects, those are designed to work with hobby servos,
whether they are digital or analog. If you have an ooPIC R board you
can just plug it into one of the 3 pin IO connector ports to test.

DLC

Russell Nickerson wrote:
> I don't think it is toast, I've opened it and nothing looks fried or
> anything. What I really think it is is the pulse width being put out
> by the oopic. How would I change the pulse width in the code? With
> PWMS or another command? What would a small code example be?
> --- In oopic@yahoogroups.com, <dennis.clark@...> wrote:
>
>>Please check your connections. The oServo objects will work fine
>
> with digital servos.
>
>>DLC
>>
>>ooPIC Tech Support
>>
>>-----Original Message-----
>>
>>From: "Russell Nickerson" <stover0107@...>
>>Subj: [oopic] HSR 5995TG and oPWMS
>>Date: Sun Jul 15, 2007 9:49 pm
>>Size: 1K
>>To: oopic@yahoogroups.com
>>
>>I bought a High torque HSR5995TG digital servo. I tried the
>
> standard
>
>>servo objects but they did not work. I went to the new oPWMS
>
> object and
>
>>still I cannot get this servo to move even an millimeter. I'm
>
> afraid to
>
>>blow anything out as well. My current setup is a large rechargable
>
> car
>
>>jumper battery at 12v (it is high for these servos but it is only
>
> for
>
>>testing. This should be more than enough to power it. So it must
>
> be my
>
>>signal. I'm in college and I am not extremely good at electronics
>
> but I
>
>>know some basic things. The entire oPWMS object is very hard to
>>understand in the documents and I'm not sure what I should change
>
> in
>
>>order to get it to work.
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>
>
>
>
>
>
> 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/

Re: [oopic] Re: USB cable Error 2 - expected v received V

Hmm,

If it isn't the Wedgie and your battery is good then as long as you
ooPIC R is good it means that your serial connection is not working.
Try connecting pins 2 and 3 on your serial cable together and use a
terminal emulator (Hyperterm, Teraterm, whatever) and type on it to see
that the characters are echoed to the screen, if they are not then debug
your serial port connection. If they are echoed then your ooPIC is
broken in some fashion. Is the little LED near the DB9 connector on the
ooPIC glowing dimly? If it is not then your ooPIC is not running at all
and something is wrong with your board.

DLC

thetruth_as_i_seeit wrote:
> Its not a wedgie. I followed the wedgie removal steps exactly, and
> still got the same error message when I tried to download known good
> code with the EEPROM removed. I also replaced the battery with a
> fresh one, even though I almost certain the old one was still good.
> Same result. After that, I went so far as to find a computer with an
> RS232 connection and downloaded code just to make sure that I could.
> It worked. No problems.
>
> What does the error message mean? I've seen examples on here where
> the message was expected v received x, but not one like mine.
>
> Any other suggestions?
>
>
> --- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...>
> wrote:
>
>>Cosmic Wedgie, search the archive for the fix, or heck here it is
>
> in a
>
>>nutshell:
>>
>>power off remove EEPROM
>>power on, download to board a KNOWN GOOD program
>>When told to put the EEPROM in, do so, while the power is still on
>>finish download
>>Change old code to put a ooPIC.delay = 500 at the start of the
>
> program
>
>>All fixed (make sure your battery is good)
>>
>>DLC
>>
>>thetruth_as_i_seeit wrote:
>>
>>>Anyone seen that one before? Its driving me nuts!
>>>
>>>Here are some more deails about my connectile dysfunction.
>>>
>>>1. I'm using an OOPic R. I've used the board with a RS232
>
> connector to
>
>>>download code with no problems.
>>>
>>>2. The machine I'm using now is brand new with only USB ports,
>
> running
>
>>>Vista (yuck!).
>>>
>>>3. When I run hyperterminal (which I had to download as Vista
>
> doesn't
>
>>>include it anymore) I have only one port active ... port 3.
>>>
>>>4. When I manually set the OOpic IDE to port 3 and try to
>
> download code
>
>>>I get the 'expected v received V" error message.
>>>
>>>5. When I used the \0V test in hyperterminal, I got nothing at
>
> all.
>
>>>Any and all help appreciated!
>>>
>>>
>>>
>>>
>>>Yahoo! Groups Links
>>>
>>>
>>>
>>
>>--
>>------------------------------------------------------
>>Dennis Clark ooPIC Tech Support
>>www.oopic.com
>>------------------------------------------------------
>>
>
>
>
>
>
>
> 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/

[oopic] Re: HSR 5995TG and oPWMS

--- In oopic@yahoogroups.com, "Russell Nickerson" <stover0107@...> wrote:
>
> I don't think it is toast, I've opened it and nothing looks fried or
> anything. What I really think it is is the pulse width being put out
> by the oopic. How would I change the pulse width in the code? With
> PWMS or another command? What would a small code example be?

Use the oServo object and the code given in the documentation. You
might try changing the end points in the loop such that S1 only varies
between 10 and 40 to be certain the value isn't outside the range of
your servo.

The oServo object is KNOWN to work - many thousands of servos are
being driven. HOWEVER, if your digital servo is sensitive to the 20
mS (50 Hz) timing, you won't get there with an OOPic. The frequency
is never exactly 50 Hz; it is either about 35 Hz or about 70 Hz. Then
again, the frequency can be slower if there are a lot of servos
defined and running at maximum width on the output pulse. Read the
oPWMS documentation for an explanation. Read the oServo documentation
for even more information.

Using the sample code, connect a voltmeter to the IOLine and ground.
I measure about 0.12V and 0.4V. Note that the code spends 15 seconds
at each level. A little long for my short attention span.

Many times when these things don't work, it is because the OOPic is
using a different power source that the load and the ground sides of
the two sources are not tied together.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: Angle of attack VII - any help appreciated

--- In oopic@yahoogroups.com, "Nick Mulder" <nick.mulder@...> wrote:
>
> Okidoki,
>
> Locally (and cheaply) I can get the 74HC160 Synchronous Decimal
> Up/Down Counter - http://www.jaycar.co.nz/products_uploaded/ZC4855.pdf
> - It seems to be the same chip aside from the fact it is BCD and not
> the full 2^4 bits

Better check page 2 of 12 where it states that the Clear input is
asynchronous. However, the Load' input is synchronous. All you have
to do is load a value of 0.

>
> Now if I'm understanding correctly it should work fine but I need a
> different setup of logic doohickeys for the reset and 13th(12th)
> outputs ?
>
> Either that or maybe:
> http://www.jaycar.co.nz/products_uploaded/ZC4864.pdf - which is a
> different beast but in the same ballpark ?

Again, this chip also has asynchronous clear. Unfortunately, it also
has asynchronous load.

Since you only want an output every 12 or 13 pulses, you can use a
single counter (74HC163) and a D flop such as the 74HC74. What we can
do is count 1..12 (12 count) or 0..12 (13 count). We generate the
LOAD' (PE') signal by NANDing Q3 and Q2 (12). We ground the D3, D2 &
D1 inputs and connect the D0 input to the Q output of a D flop. The D
input of the D flop is the Q' output of the flop and the clock is the
LOAD' signal.

Assume the D flop is reset. The Q output is 0 so when the counter
reaches 12, the counter will load with 0 and the D flop will toggle.
When the counter reaches 12 (13 clocks later) the Q output will be one
and the counter will load with 1. The Q output of the D flop will
toggle back to 0 so that 12 clocks (counts 1..12) later the counter
will be loaded with 0 again.

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:

http://docs.yahoo.com/info/terms/

[oopic] Re: USB cable Error 2 - expected v received V

--- In oopic@yahoogroups.com, "thetruth_as_i_seeit" <lone_wolf@...>
wrote:
>
> Its not a wedgie. I followed the wedgie removal steps exactly, and
> still got the same error message when I tried to download known
good
> code with the EEPROM removed. I also replaced the battery with a
> fresh one, even though I almost certain the old one was still good.
> Same result. After that, I went so far as to find a computer with
an
> RS232 connection and downloaded code just to make sure that I
could.
> It worked. No problems.
>
> What does the error message mean? I've seen examples on here where
> the message was expected v received x, but not one like mine.
>
> Any other suggestions?
>


Sounds like the USB-dongle to serial port drivers aren't loaded or
setup properly. Also, since it's an oopic-r I think you said, and
this uses a 0-5v serial port, there is an outside possibility it's
not compatible with the dongle.



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/

Re: [oopic] Re: Angle of attack VII - any help appreciated

Okidoki,

Locally (and cheaply) I can get the 74HC160 Synchronous Decimal
Up/Down Counter - http://www.jaycar.co.nz/products_uploaded/ZC4855.pdf
- It seems to be the same chip aside from the fact it is BCD and not
the full 2^4 bits

Now if I'm understanding correctly it should work fine but I need a
different setup of logic doohickeys for the reset and 13th(12th)
outputs ?

Either that or maybe:
http://www.jaycar.co.nz/products_uploaded/ZC4864.pdf - which is a
different beast but in the same ballpark ?

youch ;)
Nick


On 7/20/07, ooPIC Tech Support <dennis.clark@oopic.com> wrote:
> Actually, if you want a good "for newbies" kind of logic book get the
> old tried and true "TTL Cookbook". This has been around for 25+ years,
> but it will get you going on discrete logic.
>
> DLC
>
> Nick Mulder wrote:
> > Just reading up on the part ...
> >
> > Still way behind you in terms of knowing this stuff - really need to
> > read up on the basics - logic gates, JK flip flops and the like ...
> >
> > I'll get down to nutting it out shortly - suspect I'll need to turn
> > down the music and draw me a picture with bunnywabbits, truth tables
> > etc...
> >
> > Damn spec sheets are written *too efficiently* for me - nothing but
> > the required info huh, no '74LS163 for dummies' or 'rtstofer for
> > dummies' for that matter ;)
> >
> > cheers for the update, imagine I would have been quite confused without it !
> > Nick
> >
> > On 7/20/07, rtstofer <rstofer@pacbell.net> wrote:
> >
> >>--- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
> >>
> >>>If you use a counter with a synchronous reset (reset occurs at clock
> >>>edge) then things get a lot easier.
> >>>
> >>>Consider 2 74LS163 4 bit synchronous counters. Clock both together.
> >>>Connect the Ripple Carry Output of the low order counter to the Enable
> >>>T input of the high order counter. Ground the Enable T input of the
> >>>low order counter. Ground all the Data inputs, the Enable P inputs
> >>>and the Load inputs.
> >>>
> >>>Now, decode Q4 (the low order bit of the high order counter) AND Q3
> >>>(the high order bit of the low order counter) as a count of 24 and run
> >>>that to the Reset input. The counters will now count 0..24.
> >>>
> >>>Since you have decoded the 25th count (count = 24) all you have to do
> >>>is decode the 13th count (0..12) so: AND together Q3 and Q2 (the high
> >>>two bits of the low order counter).
> >>
> >>OOPS! The count of 24 will last for 1 clock because the counter
> >>resets but the count of 12 will last a lot longer - 4 clocks.
> >>
> >>The proper decode for count = 12 (13th pulse) is Q3 AND Q2 AND (Q1 NOR
> >>Q0).
> >>
> >>
> >>>Richard
> >>>
> >>
> >>
> >>
> >>
> >>
> >>Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
>
> --
> ------------------------------------------------------
> Dennis Clark ooPIC Tech Support
> www.oopic.com
> ------------------------------------------------------
>
>
>
> Yahoo! Groups Links
>
>
>
>



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/