Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | oSerialL and oLCDSE

oSerialL and oLCDSE - Brian Lloyd - Mar 14 20:48:24 2008

I am doing some debugging so I connected a Parallax 2x16 serial LCD to
IOline 31. At first I tried to use an oLCDSE object but just got
garbage on the display. I then switched to using oSerialL (which is
what oLCDSE uses) and I am having no problem correctly writing to the
display.

Sure I could write my own routines to write data to the LCD but was
hoping I could somehow make the oLCDSE object work with the Parallax
display. Looking at the manual for the Parallax Serial 2x16 LCD and
the Scott Edwards LCD I am just not seeing a lot of difference so I am
stumped.

FWIW I am running at 2400 baud. I did try inverting the data to no
avail.

Suggestions?

Brian Lloyd
Granite Bay Montessori School 9330 Sierra College Bl
brian AT gbmontessori DOT com Roseville, CA 95661
+1.916.367.2131 (voice) +1.791.912.8170 (fax)

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )


Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 17 0:04:12 2008

My personal opinion is that the oLCDSE was a bad idea - It really only
works with one of the SE displays, the others have different command
sets - And of course all of the other serial LCDs have different command
sets. I've just used oSerialL and written my own code. Since there is
a ton of space in the EEPROM to use in most cases, this isn't all that
much of a burden. We don't need to use any object space beyond the
oSerialL.

DLC

Brian Lloyd wrote:
> I am doing some debugging so I connected a Parallax 2x16 serial LCD to
> IOline 31. At first I tried to use an oLCDSE object but just got
> garbage on the display. I then switched to using oSerialL (which is
> what oLCDSE uses) and I am having no problem correctly writing to the
> display.
>
> Sure I could write my own routines to write data to the LCD but was
> hoping I could somehow make the oLCDSE object work with the Parallax
> display. Looking at the manual for the Parallax Serial 2x16 LCD and
> the Scott Edwards LCD I am just not seeing a lot of difference so I am
> stumped.
>
> FWIW I am running at 2400 baud. I did try inverting the data to no
> avail.
>
> Suggestions?
>
> Brian Lloyd
> Granite Bay Montessori School 9330 Sierra College Bl
> brian AT gbmontessori DOT com Roseville, CA 95661
> +1.916.367.2131 (voice) +1.791.912.8170 (fax)
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
>
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 2:14:24 2008


On Mar 16, 2008, at 8:50 PM, ooPIC Tech Support wrote:

> My personal opinion is that the oLCDSE was a bad idea - It really only
> works with one of the SE displays, the others have different command
> sets - And of course all of the other serial LCDs have different=20=20
> command
> sets. I've just used oSerialL and written my own code. Since there=20=20
> is
> a ton of space in the EEPROM to use in most cases, this isn't all that
> much of a burden. We don't need to use any object space beyond the
> oSerialL.

That was the conclusion I had come to also but wanted confirmation. It=20=20
is what I have started to do.

Has anyone written the equivalent of fprintf? Yes, I can but I don't=20=20
want to take the time if someone else has.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Andrew Porrett - Mar 17 7:54:34 2008

At 01:59 AM 3/17/2008, Brian Lloyd wrote:

>Has anyone written the equivalent of fprintf? Yes, I can but I don't
>want to take the time if someone else has.

Actually, I don't think you can. If the compiler doesn't support
variable arguments and a string / character pointer datatype, how are
you going to do it?

I'll start writing it, then it's your turn... :)

Function word fprintf(
Sorry, that's as far as I got. The V6 compiler wants that "Function"
keyword, even for C source code, right? Scott couldn't look for
"byte"/"word" + C identifier + "(" ? Jeebus.
...Andy

========================================================================
Groups related to oopic
========================================================================

SeattleRobotics (233 common members)
http://groups.yahoo.com/group/SeattleRobotics?v=1&t=ipt&ch=email&pub=groups&slk=aftr0&sec=recg
Mechanical/Robotics: The Seattle Robotics Society is a world wide group...

piclist (183 common members)
http://groups.yahoo.com/group/piclist?v=1&t=ipt&ch=email&pub=groups&slk=aftr1&sec=recg
Microprocessors/Microcontrollers: A discussion group for the PICMicro microcontrolle...

Robotics (130 common members)
http://groups.yahoo.com/group/Robotics?v=1&t=ipt&ch=email&pub=groups&slk=aftr2&sec=recg
Mechanical/Robotics: Robotics discussion group. This egroup is for thos...

rabbit-semi (119 common members)
http://groups.yahoo.com/group/rabbit-semi?v=1&t=ipt&ch=email&pub=groups&slk=aftr3&sec=recg
Microprocessors/Microcontrollers: This is a user group for folks designing and progr...

PARTS (107 common members)
http://groups.yahoo.com/group/PARTS?v=1&t=ipt&ch=email&pub=groups&slk=aftr4&sec=recg
Mechanical/Robotics: Portland Area Robotics Society is a club formed to...
------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 17 11:04:47 2008

Any of the printf() functions require run-time interpretation, which
is a major resource hog in any program. The ooPIC doesn't have that
capability.

DLC

Brian Lloyd wrote:
> On Mar 16, 2008, at 8:50 PM, ooPIC Tech Support wrote:
>
>
>> My personal opinion is that the oLCDSE was a bad idea - It really only
>> works with one of the SE displays, the others have different command
>> sets - And of course all of the other serial LCDs have different
>> command
>> sets. I've just used oSerialL and written my own code. Since there
>> is
>> a ton of space in the EEPROM to use in most cases, this isn't all that
>> much of a burden. We don't need to use any object space beyond the
>> oSerialL.
>>
>
> That was the conclusion I had come to also but wanted confirmation. It
> is what I have started to do.
>
> Has anyone written the equivalent of fprintf? Yes, I can but I don't
> want to take the time if someone else has.
>
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
>
> I fly because it releases my mind from the tyranny of petty things . . .
> — Antoine de Saint-Exupéry
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 13:07:57 2008

On Mar 17, 2008, at 4:33 AM, Andrew Porrett wrote:

> At 01:59 AM 3/17/2008, Brian Lloyd wrote:
>
>> Has anyone written the equivalent of fprintf? Yes, I can but I don't
>> want to take the time if someone else has.
>
> Actually, I don't think you can. If the compiler doesn't support
> variable arguments and a string / character pointer datatype, how are
> you going to do it?
>
> I'll start writing it, then it's your turn... :)
>
> Function word fprintf(
> Sorry, that's as far as I got. The V6 compiler wants that "Function"
> keyword, even for C source code, right? Scott couldn't look for
> "byte"/"word" + C identifier + "(" ? Jeebus.

OK. Point made.

Now, does anyone have some routines that will convert various numeric=20=20
data types into their ASCII string representations? And a string is a=20=20
null-terminated array of char. That should be possible to implement=20=20
even if it isn't treated properly within the language itself. I can=20=20
clock that out to the serial LCD one character at a time without too=20=20
much trouble. After all, I am not trying to build a full-on terminal,=20=20
just a way to display some simple information.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 13:18:14 2008

OK, I'll bite. How do you guys do debugging of ooPIC code? I have put=20=20
together a moderately complex state machine that is not behaving as I=20=20
expect it should. So I need to track events and state transitions. (I=20=20
am not using ooPIC events as they are not working right now in C.1.1+.)

So for now I insert a while statement that spins on an input to act as=20=20
a breakpoint and then I examine the properties and/or variables but I=20=20
would like to be able to monitor things as the system is running so I=20=20
can see the response to events in something more like real-time. I am=20=20
trying to get the LCD to allow that.

(I sure would like a real source-level debugger via SCP and the IDE.)

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - rtstofer - Mar 17 14:35:21 2008

> OK. Point made.
>
> Now, does anyone have some routines that will convert various numeric
> data types into their ASCII string representations? And a string is a
> null-terminated array of char. That should be possible to implement
> even if it isn't treated properly within the language itself. I can
> clock that out to the serial LCD one character at a time without too
> much trouble. After all, I am not trying to build a full-on terminal,
> just a way to display some simple information.

Str$(somevalue) as described in Chapter 13 - Strings of the ooPIC
Programmer's Guide.

I THINK the oSerialL will work with a string although it isn't
documented. oSerialH does have a sample program for strings.
Dim MySerial as oSerialL

sub main()

MySerial.Baud = cv2400
MySerial.Operate = cvTrye
MySerial.Value = STR$(1234)
MySerial.Value = 13
MySerial.Value = 10

end sub

Richard

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Andrew Porrett - Mar 17 15:08:53 2008

At 12:30 PM 3/17/2008, Brian Lloyd wrote:
>OK, I'll bite. How do you guys do debugging of ooPIC code? I have put
>together a moderately complex state machine that is not behaving as I
>expect it should. So I need to track events and state transitions. (I
>am not using ooPIC events as they are not working right now in C.1.1+.)
>
>So for now I insert a while statement that spins on an input to act as
>a breakpoint and then I examine the properties and/or variables but I
>would like to be able to monitor things as the system is running so I
>can see the response to events in something more like real-time. I am
>trying to get the LCD to allow that.

Easiest thing to do is just send debugging data out the (real) serial
port to your PC. Run a terminal emulator to display/log the data.
...Andy

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Andrew Porrett - Mar 17 15:15:40 2008

At 01:05 PM 3/17/2008, Brian Lloyd wrote:
>Now, does anyone have some routines that will convert various numeric
>data types into their ASCII string representations? And a string is a
>null-terminated array of char. That should be possible to implement
>even if it isn't treated properly within the language itself.

Sounds like you want an itoa() clone. Byte or word data in, ASCII digits out.
> I can
>clock that out to the serial LCD one character at a time without too
>much trouble. After all, I am not trying to build a full-on terminal,
>just a way to display some simple information.

Rather than build a string that you're just going to send to the LCD
and then throw away, you should go with itol() - integer to LCD. I
suspect you'll want to specify a field width: itol(value, width)

One function can handle bytes, signed words and unsigned words with
values less than 0x8000. If you need to handle all unsigned values,
there is a bit more work to do. The trick is to do this quickly
(you're using a 0.0003 MIPS processor) without using a lot of
variables - you don't want your formatting function eating up a
quarter of your data space.

Which way did you want to go? itoa or itol? Or the poor man's
substitute - Str$?
...Andy

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 17 16:26:04 2008

My favorite method, which I use even on IDE's that have full ICE ability
is "printf". On most processors I use a plain ol' string output over a
serial port. I will admit that having full breakpoint capability is a
boon when working with complex state machines - But sometime just
picking a couple of variables to print out at certain points will
provide all you need to ponder.

DLC

Brian Lloyd wrote:
> OK, I'll bite. How do you guys do debugging of ooPIC code? I have put
> together a moderately complex state machine that is not behaving as I
> expect it should. So I need to track events and state transitions. (I
> am not using ooPIC events as they are not working right now in C.1.1+.)
>
> So for now I insert a while statement that spins on an input to act as
> a breakpoint and then I examine the properties and/or variables but I
> would like to be able to monitor things as the system is running so I
> can see the response to events in something more like real-time. I am
> trying to get the LCD to allow that.
>
> (I sure would like a real source-level debugger via SCP and the IDE.)
>
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
>
> I fly because it releases my mind from the tyranny of petty things . . .
> — Antoine de Saint-Exupéry
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 17 16:35:13 2008

I'm not at home at the moment, but I have some routines that handle
bit, byte and word variables out to the serial port. Nothing quite so
elaborate as you discuss though. I can post them if you wish.

DLC

Brian Lloyd wrote:
> On Mar 17, 2008, at 4:33 AM, Andrew Porrett wrote:
>
>
>> At 01:59 AM 3/17/2008, Brian Lloyd wrote:
>>
>>
>>> Has anyone written the equivalent of fprintf? Yes, I can but I don't
>>> want to take the time if someone else has.
>>>
>> Actually, I don't think you can. If the compiler doesn't support
>> variable arguments and a string / character pointer datatype, how are
>> you going to do it?
>>
>> I'll start writing it, then it's your turn... :)
>>
>> Function word fprintf(
>> Sorry, that's as far as I got. The V6 compiler wants that "Function"
>> keyword, even for C source code, right? Scott couldn't look for
>> "byte"/"word" + C identifier + "(" ? Jeebus.
>>
>
> OK. Point made.
>
> Now, does anyone have some routines that will convert various numeric
> data types into their ASCII string representations? And a string is a
> null-terminated array of char. That should be possible to implement
> even if it isn't treated properly within the language itself. I can
> clock that out to the serial LCD one character at a time without too
> much trouble. After all, I am not trying to build a full-on terminal,
> just a way to display some simple information.
>
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
>
> I fly because it releases my mind from the tyranny of petty things . . .
> — Antoine de Saint-Exupéry
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Ian Drennan - Mar 17 19:13:02 2008

Brian Lloyd wrote:
> OK, I'll bite. How do you guys do debugging of ooPIC code? I have put
> together a moderately complex state machine that is not behaving as I
> expect it should. So I need to track events and state transitions. (I
> am not using ooPIC events as they are not working right now in C.1.1+.)
>
> So for now I insert a while statement that spins on an input to act as
> a breakpoint and then I examine the properties and/or variables but I
> would like to be able to monitor things as the system is running so I
> can see the response to events in something more like real-time. I am
> trying to get the LCD to allow that.
>
> (I sure would like a real source-level debugger via SCP and the IDE.)
>
Brian

Did you ever try the 'Object Watcher' tool I mentioned a week ago?

Ian

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 22:07:45 2008


On Mar 17, 2008, at 12:29 PM, Ian Drennan wrote:

> Brian Lloyd wrote:
>> OK, I'll bite. How do you guys do debugging of ooPIC code? I have put
>> together a moderately complex state machine that is not behaving as I
>> expect it should. So I need to track events and state transitions. (I
>> am not using ooPIC events as they are not working right now in C.=20
>> 1.1+.)
>>
>> So for now I insert a while statement that spins on an input to act=20=20
>> as
>> a breakpoint and then I examine the properties and/or variables but I
>> would like to be able to monitor things as the system is running so I
>> can see the response to events in something more like real-time. I am
>> trying to get the LCD to allow that.
>>
>> (I sure would like a real source-level debugger via SCP and the IDE.)
>>
> Brian
>
> Did you ever try the 'Object Watcher' tool I mentioned a week ago?

Nope. And now I am away from the system for a few days. I will try it=20=20
when I get back.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Groups related to oopic =
=09
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

SeattleRobotics (233 common members)=20=20=20=20=20=20=20=20=20=20=20
http://groups.yahoo.com/group/SeattleRobotics?v=3D1&t=3Dipt&ch=3Demail&pub=
=3Dgroups&slk=3Daftr0&sec=3Drecg=20=20
Mechanical/Robotics: The Seattle Robotics Society is a world wide group...

piclist (183 common members)=20=20=20=20=20=20=20=20=20=20=20
http://groups.yahoo.com/group/piclist?v=3D1&t=3Dipt&ch=3Demail&pub=3Dgroups=
&slk=3Daftr1&sec=3Drecg=20=20
Microprocessors/Microcontrollers: A discussion group for the PICMicro micro=
controlle...

Robotics (130 common members)=20=20=20=20=20=20=20=20=20=20=20
http://groups.yahoo.com/group/Robotics?v=3D1&t=3Dipt&ch=3Demail&pub=3Dgroup=
s&slk=3Daftr2&sec=3Drecg=20=20
Mechanical/Robotics: Robotics discussion group. This egroup is for thos...

rabbit-semi (119 common members)=20=20=20=20=20=20=20=20=20=20=20
http://groups.yahoo.com/group/rabbit-semi?v=3D1&t=3Dipt&ch=3Demail&pub=3Dgr=
oups&slk=3Daftr3&sec=3Drecg=20=20
Microprocessors/Microcontrollers: This is a user group for folks designing =
and progr...

PARTS (107 common members)=20=20=20=20=20=20=20=20=20=20=20
http://groups.yahoo.com/group/PARTS?v=3D1&t=3Dipt&ch=3Demail&pub=3Dgroups&s=
lk=3Daftr4&sec=3Drecg=20=20
Mechanical/Robotics: Portland Area Robotics Society is a club formed to...
------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 22:07:49 2008


On Mar 17, 2008, at 1:08 PM, ooPIC Tech Support wrote:

> Yes, oSerialL works with strings, its all just characters.

That helps.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 17 22:46:47 2008


On Mar 17, 2008, at 1:27 PM, ooPIC Tech Support wrote:

> I'm not at home at the moment, but I have some routines that handle
> bit, byte and word variables out to the serial port. Nothing quite so
> elaborate as you discuss though. I can post them if you wish.

I am not building a report generator. ;-) Anything would be great.=20=20
Thanks.

OTOH str$() should work just fine. I missed it because I was searching=20=20
in the language and object references, not the programmer's guide. My=20=20
apologies to everyone for asking a question I could have found the=20=20
answer to myself.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 18 0:02:42 2008


On Mar 17, 2008, at 1:12 PM, ooPIC Tech Support wrote:

> My favorite method, which I use even on IDE's that have full ICE=20=20
> ability
> is "printf". On most processors I use a plain ol' string output=20=20
> over a
> serial port. I will admit that having full breakpoint capability is a
> boon when working with complex state machines - But sometime just
> picking a couple of variables to print out at certain points will
> provide all you need to ponder.

Yes, that is the tried-n'-true method. It is what I have always fallen=20=20
back on.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 18 6:33:06 2008

Yes, oSerialL works with strings, its all just characters.

DLC

rtstofer wrote:
>> OK. Point made.
>>
>> Now, does anyone have some routines that will convert various numeric
>> data types into their ASCII string representations? And a string is a
>> null-terminated array of char. That should be possible to implement
>> even if it isn't treated properly within the language itself. I can
>> clock that out to the serial LCD one character at a time without too
>> much trouble. After all, I am not trying to build a full-on terminal,
>> just a way to display some simple information.
>>
>
> Str$(somevalue) as described in Chapter 13 - Strings of the ooPIC
> Programmer's Guide.
>
> I THINK the oSerialL will work with a string although it isn't
> documented. oSerialH does have a sample program for strings.
> Dim MySerial as oSerialL
>
> sub main()
>
> MySerial.Baud = cv2400
> MySerial.Operate = cvTrye
> MySerial.Value = STR$(1234)
> MySerial.Value = 13
> MySerial.Value = 10
>
> end sub
>
> Richard
>
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - ooPIC Tech Support - Mar 20 0:33:12 2008

Brian,

Here is a simple one that can handle bit, nibble and byte variables -
it outputs to a parallel LCD function that I wrote, but it will work
just as well to a serial port. Note, you should be able to extend it to
work with a WORD variable by extending the highest "10's" position to be
10000 instead of 100.
It isn't particularly sophisticated, it can't handle negative numbers
for instance, but it is a decent starting point.

DLC

void printData(byte wt)
{
//Print out a byte, nibble or bit value to LCD
//This simply outputs one character at a time by finding the
//digit in the 100 place (255 is highest number) and
//works down to the 1's place. No leading zeros are output.

byte wTemp;
byte bTemp;
byte mTemp;

bTemp = 0;
mTemp = 0;

wTemp = 100;
While(wTemp > 0)
{
mTemp = wt/wTemp;
If((mTemp > 0) | (bTemp == 1) | (wTemp == 1))
{
wt = wt - mTemp * wTemp;
bTemp = 1; //Now print trailing zeros
LCD.Value = mTemp + 48; //convert to ASCII character
} //end If
If(wTemp == 1)
{
wTemp = 0;
}
Else
{
wTemp = wTemp /10;
} //end If
} //end While
} //end Sub

Brian Lloyd wrote:
> On Mar 17, 2008, at 1:27 PM, ooPIC Tech Support wrote:
>
>
>> I'm not at home at the moment, but I have some routines that handle
>> bit, byte and word variables out to the serial port. Nothing quite so
>> elaborate as you discuss though. I can post them if you wish.
>>
>
> I am not building a report generator. ;-) Anything would be great.
> Thanks.
>
> OTOH str$() should work just fine. I missed it because I was searching
> in the language and object references, not the programmer's guide. My
> apologies to everyone for asking a question I could have found the
> answer to myself.
>
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
>
> I fly because it releases my mind from the tyranny of petty things . . .
> — Antoine de Saint-Exupéry
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
> ------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: oSerialL and oLCDSE - Brian Lloyd - Mar 20 0:42:29 2008


On Mar 19, 2008, at 8:32 PM, ooPIC Tech Support wrote:

> Brian,
>
> Here is a simple one that can handle bit, nibble and byte variables -
> it outputs to a parallel LCD function that I wrote, but it will work
> just as well to a serial port. Note, you should be able to extend=20=20
> it to
> work with a WORD variable by extending the highest "10's" position=20=20
> to be
> 10000 instead of 100.
> It isn't particularly sophisticated, it can't handle negative numbers
> for instance, but it is a decent starting point.

Thank you Dennis.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )