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, August 7, 2007

Re: [oopic] Re: ooPic oSerial compile problem with cv38400

Hi Richard,

Thank you very much... it worked...

Regards,
Angelo


----- Original Message ----
From: rtstofer <rstofer@pacbell.net>
To: oopic@yahoogroups.com
Sent: Thursday, 12 July, 2007 2:53:42 PM
Subject: [oopic] Re: ooPic oSerial compile problem with cv38400

--- In oopic@yahoogroups. com, "Angelo" <mowens18@.. .> wrote:
>
> Hi,
>
> I hope someone can help me with this query...
>
> I am trying to compile the following program but I seem to be getting
> the error 81 - Undefined identifier for the following program:
> ************ ********* *******
> Dim Serial As New oSerialH
>
> Sub Main()
> Serial.Baud = cv38400
> Serial.Operate = cvTrue
> Serial.String = "Test1234"
> End Sub
> ************ ********* *******
>
> The program compiles fine with the cv9600 buad rate but how do I get
> the cv38400 baud rate to work?
>
> thanks guys,
> Angelo
>

Are you sure you have selected the proper chip version?
If nothing else works, set Serial.Baud = 7 and try that.

Richard

___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html


[Non-text portions of this message have been removed]


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, August 5, 2007

Re: [oopic] I need a some help with the folloowing program.

Try using oCompare to check the two values. When you are subtracting
one from the other you can get negative values which look weird because
0-1 = 128, which you certainly don't expect to see! My usual would be
to feed each SONAR value to an oMath to strip off the lower two bits of
resolution, or perhaps bottom 3 bits (0-7), then feed those results to
oCompare. It will operate very fast and be a bit easier to understand.

DLC

gravito_magnetics wrote:
> Hi,
>
> I have problem with the following program.
> The problem is that I want to compare the subtract value between
> Rsonar and Lsonar values, so first I did this
>
> sonar1 = Rsonar - Lsonar
>
> But it gave me some strange value when I use the debugger to display
> the value of sonar1. As an example, when the value of Rsonar and
> Lsonar were 27, the value for sonar1 was 117 (sometime, it displays
> different number) while I expected 0 (zero), so I changed to oMath,
> but still the value of sonar1 dosen't make any sense to me.
>
> My experience with oopic is limited, so please help me.
>
> Thank you,
>
> TS
>
>
> Dim Lsonar as New oA2D 'Left Sonar Sensor
> Dim Rsonar as New oA2D 'Right Sonar Sensor
> Dim Rmotor as New oServo 'Move the Right motor
> Dim Lmotor as New oServo 'Move the Left motor
> Dim Add1 as New oMath
> Dim sonar1 as New oByte
> Dim sonar2 as New oByte
>
> Sub Main()
>
> OOPic.Node = 1 'For debugging
>
> Rsonar.IOLine = 6 'IOLine 6 for sensor
> Lsonar.IOLine = 7 'IOLine 7 for sensor
> Rsonar.Operate = cvTrue
> Lsonar.Operate = cvTrue
>
> Rmotor.IOLine = 21 'IOLine 21 for Right
> Rmotor.Center = 22 'The "standard" center value
> Rmotor.Operate = cvTrue
>
> Lmotor.IOLine = 26 'IOLine 26 for Left
> Lmotor.Center = 22 'The "standard" center value
> Lmotor.Operate = cvTrue
>
> Add1.Input1.Link(Rsonar) 'Get right sonar data
> Add1.Input2.Link(Lsonar)
> Add1.Output.Link(sonar1)
> Add1.Mode = cvSubtract
> Add1.Operate = cvTrue
>
>
> Do
> If sonar1 > 7 Then
> Rmotor.Value = 26
> Lmotor.Value = 26
>
> Else
> Rmotor.Value = 38
> Lmotor.Value = 38
>
> End If
>
> 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/

[oopic] I need a some help with the folloowing program.

Hi,

I have problem with the following program.
The problem is that I want to compare the subtract value between
Rsonar and Lsonar values, so first I did this

sonar1 = Rsonar - Lsonar

But it gave me some strange value when I use the debugger to display
the value of sonar1. As an example, when the value of Rsonar and
Lsonar were 27, the value for sonar1 was 117 (sometime, it displays
different number) while I expected 0 (zero), so I changed to oMath,
but still the value of sonar1 dosen't make any sense to me.

My experience with oopic is limited, so please help me.

Thank you,

TS


Dim Lsonar as New oA2D 'Left Sonar Sensor
Dim Rsonar as New oA2D 'Right Sonar Sensor
Dim Rmotor as New oServo 'Move the Right motor
Dim Lmotor as New oServo 'Move the Left motor
Dim Add1 as New oMath
Dim sonar1 as New oByte
Dim sonar2 as New oByte

Sub Main()

OOPic.Node = 1 'For debugging

Rsonar.IOLine = 6 'IOLine 6 for sensor
Lsonar.IOLine = 7 'IOLine 7 for sensor
Rsonar.Operate = cvTrue
Lsonar.Operate = cvTrue

Rmotor.IOLine = 21 'IOLine 21 for Right
Rmotor.Center = 22 'The "standard" center value
Rmotor.Operate = cvTrue

Lmotor.IOLine = 26 'IOLine 26 for Left
Lmotor.Center = 22 'The "standard" center value
Lmotor.Operate = cvTrue

Add1.Input1.Link(Rsonar) 'Get right sonar data
Add1.Input2.Link(Lsonar)
Add1.Output.Link(sonar1)
Add1.Mode = cvSubtract
Add1.Operate = cvTrue

Do
If sonar1 > 7 Then
Rmotor.Value = 26
Lmotor.Value = 26

Else
Rmotor.Value = 38
Lmotor.Value = 38

End If

Loop

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] Re: a bit off topic maybe - XBee units... ground ? grrr

--- In oopic@yahoogroups.com, "Nick Mulder" <nick.mulder@...> wrote:
>


It sounds like you've discovered your probe is the problem.

The way to verify this is simply to connect one probe and then the
other probe separately to the same test point and gnd point, and with
the probes connected to the same scope channel. Assuming the pcb
being tested isn't otherwise grounded [run it off a battery], then
the signals in the 2 probes will look very different, if one of the
probe grounds has a fault.

> I always connect the ground probes - In any of my descriptions up to
> this point (as hard to decipher they appear to be for anyone but
> myself) I have done this ...
>
> "input to the TX XBee and the output of the RX XBee", I assume you
> were comparing signals on the 2 different modules at the same time."
>
> yep, exactly that ...
>
> "This will only work properly with the probe gnds connected to the
> individual boards, which will electrically connect the gnds of the 2
> boards together."
>
> That was my original point - It doesn't appear to do this ... I had
to
> physically connect them at the circuit - a bit of wire from one
> breadboard to the other for it to work... - After further fiddling
and
> swapping the probes from input A to B I think one of the probes is
at
> 'fault' (either that or I am)...
>
> I have put both probes on the same pin of the RX (receiving XBee)
and
> connected the gnds to the battery power '-ve' that is powering the
> same unit - I get the same signal on both scope probes (as
expected) -
> yet when I disconnect the ground on the 'fluke' brand probe both
> signals go whacky (independent of whatever Input it is in) - if I
> disconnect the 'phillips' brand probe both signals are still good
> (regardless of it now being an 'antenna')
>
> - I reckon however that further discussion is just going to get me
> confused or at least you a little unfairly fatigued until I read up
on
> my scope basics ... At first I thought it was the XBee's but its
> really my misuse or misunderstanding of scopes (or a potential fault
> in the probe, unlikely though)
>



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: a bit off topic maybe - XBee units... ground ? grrr

> blow me down >> one of the probes ground dingalings isn't showing
> continuity from the alligator clip to the end of the BNC-ish
> thingy-dingaling at the other end.
>
> 5mins later - wire was broken at spring clip end (other end of
> alligator clip) ... cut and resoldered ... WORKING
>
> right on the money!
>

It WAS a duck!

The problems you have experienced are common. There's a reason I knew
it was a defective ground lead...

Taken in sum, all of these problems add up to experience. I would
like to say that it gets easier with time but it doesn't. The simple
problems are just upgraded to more difficult problems.

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/

Saturday, August 4, 2007

Re: [oopic] Re: a bit off topic maybe - XBee units... ground ? grrr

I have good days and bad days with electronics - sometimes have spent
a good 48hours staring at a circuit that wasn't working thinking all
sorts of rude things about the quality of this and that and how crap
the advice was that website B and colleague B gave me to find I hadn't
connected power to all the components or something as equally daft -
In other cases I had made up simplified logic in my head that turned
out to be inadequate for the complexity of the circuit I had made
(especially true of op-amps and analog electronics) ...

One particular circuit I had reverse engineered from a product with a
mind to make a few for my mates (component costs were a factor of 200x
cheaper than the bought product) .. well anyway I had drawn up a cct
diagram and had a few months later used it to build a working circuit
at least twice but from then on all attempts to remake it have
failed... I cannot for the life of me see what is different about my
latest attempts compared to the working versions, swapping all the
individual components shows nothing at fault ... The amount of time
spent on it soon made the cost of a new bought item worth while again.

anyhoo - these are some reasons why I tend to rather blame myself
first, but since life must go on I'll ask fro help from such forums
and email groups ...... aaaaaaaaand to cut a long story short:

blow me down >> one of the probes ground dingalings isn't showing
continuity from the alligator clip to the end of the BNC-ish
thingy-dingaling at the other end.

5mins later - wire was broken at spring clip end (other end of
alligator clip) ... cut and resoldered ... WORKING

right on the money!



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: a bit off topic maybe - XBee units... ground ? grrr

> - I reckon however that further discussion is just going to get me
> confused or at least you a little unfairly fatigued until I read up on
> my scope basics ... At first I thought it was the XBee's but its
> really my misuse or misunderstanding of scopes (or a potential fault
> in the probe, unlikely though)
>

Why do you think this is unlikely? It is possible that the ground
connection on one scope probe IS defective. I have had the case where
the solder connection inside the alligator clip goes awry. The crimp
keeps the cable in place but the solder joint is not working.

If it looks like a duck and quacks like a duck, maybe it IS a duck!

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/