PDA

View Full Version : A Little surprise with PbP 2.50 ...



Acetronics2
- 13th October 2007, 13:09
Hi,

I just received my Upgrade ...

1st compiling ...


Warning[202] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\TRACTEUR2.MAC 700 : Argument out of range. Least significant bits used.

Warning[202] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\TRACTEUR2.MAC 700 : Argument out of range. Least significant bits used.


with these 2 PbP lines …

LCDOUT $FE,$C0," ", SDEC2 Tair,"°C "
And

LCDOUT $FE,$C0," ", SDEC3 Thuile,"°C"

That compiled fine with the 2.47 release.



Removing the « ° » symbol suppresses the warning.


Little question ... is there a place to download the 2.50 Manual ??? ( NOTHING about the news on the CD ...)

Alain

Steve_88
- 13th October 2007, 18:48
Hi Alain,

I just ordered pbp2.50 a few days ago, it's disappointing an updated manual or at least some examples of the new features are not given.

-Steve

BrianT
- 14th October 2007, 02:12
Being warned via this forum that PBP 2.50 was a fairly major change I ordered the CD-ROM with new handbook. The pair arrived so it is available. I have yet to find the major changes except to note that a compile with PBPL takes much more codespace than the same code compiled with BPBW.

A great pity is that there are no examples of what can be done with LONG variables and errors or shortcomings still remain with some commands.

The new manual is a small cost and was worth it to replace my dog eared and coffee stained manual from several revisions ago.

The MELABS web site and the manual fail any reasonable test for 'traceability'. There are no meaningful revision numbers shown in the manuals, or on the web site. There are no statements about what version is supported by the manual.

I imagine the PBP staff are reluctant to put the latest manual up on the web as it would only encourage ripoff copies of the program and the manual.

HTH
Brian

locko
- 14th October 2007, 10:04
Although the manuals do not have the software revision number on them, they do have a date. It is located on the first page.

2.46 = 9/05
2.47 = 9/05
2.50 = 7/07

Haven't written anything using 2.50, just made sure it works - so no comments on it yet.

Regards,

Paul

Acetronics2
- 14th October 2007, 10:24
Confirmed ...

Here is a little try: ( read from the .ASM file )

; C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\PICBOARD.BAS 00046 LCDOUT $FE, $C0, DEC NCD I,"°öµC"
LCDOUT?C 0FEh
LCDOUT?C 0C0h
LCDOUTCOUNT?C 000h
NCD?WW _I, T1
LCDOUTNUM?W T1
LCDOUTDEC?
LCDOUT?C 0FFB0h ************ " ° " outputs $B0 instead of $DF
LCDOUT?C 0FFF6h ************ " ö " outputs $F6 instead of $EF
LCDOUT?C 0FFB5h ************ " µ " outputs $B5 instead of $F7
LCDOUT?C 043h ************ " C " outputs $43 … which is GOOD !!


Not so easy to debug what happens to Cin value !!!

Alain

MarioC
- 15th October 2007, 04:35
I agree with BrianT, maybe Microengineeringlabs don't wan't people to get the updated manual via pdf.


The manual has some insight on the new LONG format; some new DIG modifiers (0-9, instead of 0-4) SDEC and other issues but it lacks on good support.

I got mine back in 2003 when I got PBP at Rentron..... a pitty they don't upload the new manual to their website (melabs that is).

Ioannis
- 15th October 2007, 07:39
Confirmed ...

Here is a little try: ( read from the .ASM file )

; C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\PICBOARD.BAS 00046 LCDOUT $FE, $C0, DEC NCD I,"°öµC"
LCDOUT?C 0FEh
LCDOUT?C 0C0h
LCDOUTCOUNT?C 000h
NCD?WW _I, T1
LCDOUTNUM?W T1
LCDOUTDEC?
LCDOUT?C 0FFB0h ************ " ° " outputs $B0 instead of $DF
LCDOUT?C 0FFF6h ************ " ö " outputs $F6 instead of $EF
LCDOUT?C 0FFB5h ************ " µ " outputs $B5 instead of $F7
LCDOUT?C 043h ************ " C " outputs $43 … which is GOOD !!


Not so easy to debug what happens to Cin value !!!

Alain


If I got it right, by that you mean that new version 2.50 puts garbage to strings?

Ioannis

Acetronics2
- 15th October 2007, 08:55
Hi, Ioannis

The exact meaning is PbP 2.50 LCDOUT doesn't work properly with characters which Character "number" is > 127 ( see LCD Character Table ...)

Alain

Wilson
- 15th October 2007, 09:05
Well now. Maybe when novices ask a question, senior members will stop saying RTFM

Acetronics2
- 15th October 2007, 09:33
Well now. Maybe when novices ask a question, senior members will stop saying RTFM

Hi, Wilson ...

That can't be in the Manual ... of course !!!

You HAVE to read the manual !!! repeating the book pages is a bit boring and uninteresting for everyone ... but you ... don't you think ???

Alain

Luciano
- 15th October 2007, 10:19
PbP 2.50 LCDOUT doesn't work properly with characters
which ASCII "number" is > 127 ( see ASCII Table ...)

Hi Alain,

OS version?
What is the used language on you PC? English United States?

Can you post a short program so that someone can try to
compile it on a 100% English United States system?

Best regards,

Luciano

Acetronics2
- 15th October 2007, 10:25
Hi, Luciano

Ooops !!! Not Asciii characters but LCD Characters ( so, no link to OS or machine ... or version of English ... LOL )

If the Highest bit of the Character code is set ... Wrong Output !!!


Just try this line, whatever the processor :



LCDOUT $FE, 1, "°öµC"

and look at what displayed.


Alain

Ioannis
- 15th October 2007, 10:36
OK, Alain. I got it. To be sure of what you typed and what I did see on screen I converted to image and attached it. So is this what you really typed? My system is English-Greek.

Ioannis

Luciano
- 15th October 2007, 10:45
Hi Alain,

I understand that you have a problem when you compile

LCDOUT $FE,$C0," ", SDEC2 Tair,"°C "
where the degree symbol is not correctly translated in
the corresponding LCD character.

Are you sure that during the source code parsing the compiler
gets the correct character? This is why I suggested to try on
a 100% English United States system.

Best regards,

Luciano

Acetronics2
- 15th October 2007, 11:21
Luciano,

There was no problem with 2.47 release

so, Understand that is not my problem ... but melabs' !!!

I've had a quick look to see if I could debug it by myself ... just found the problem occurs with > 127 ASCII input ( keyboard ) values.

I'm just a system user ... and my computer knowledge stops at the letters stamped on my keyboard !!!

Alain

Bruce
- 15th October 2007, 13:32
ASCII characters with the high bit set are extended ASCII codes. As far as I know, all
compilers that accept ASCII codes between the double quotes only work with standard
ASCII codes. Not extended codes.

I have tried your example with extended ASCII codes "°öµC" with versions 2.47 and 2.5
of PBP, another BASIC compiler, and two C compilers. They all output the same garbage
where each extended ASCII character is between the quotes. All non extended codes
print as expected.

PBP 2.50 seems to be the only compiler that shows the warning, but they all print junk
on my LCD where extended ASCII codes are located in the string, between the "".

Did you get PBP v2.47 to actually print these extended ASCII characters "as shown", in
between the " " on your LCD, or did it just not throw the warning?

I'm just curious because I get the same results with 5 different compilers.

Acetronics2
- 15th October 2007, 14:05
Hi, Bruce

... I've used a lot of DS1820 temp monitors without noticing anything for years.

BUT ... having a further look to those programs, I notice I've ever used the HEX value ( $DF ) ... instead of the " ° " Keyboard input ...

a try ( 2.47 and 2.50 ) gives not garbage ... but characters from the 128-256 code section of the characters map.

And now, we've a Warning !!!


One more notice to add to my poor old manual ... there might be a blank page between two command ones ... to add one's comments. LOL.


So, Let's keep in mind that Complementary table can only be accessed sending HEX Values ... like here:

Lcdout $fe, 1, DEC (temperature / 100), ".", DEC2 temperature, " ",$DF,"C"

Alain

PS : Pfouuuuu, I was not so far from the RTFM !!! ...

Bruce
- 15th October 2007, 16:50
Hi Alain,

It is a bit confusing I guess, but maybe this will help explain it.

When you place the degree symbol inside quotes like this "°" the value gets converted to
$B0.

If you send $B0 to a terminal program like this: HSEROUT [$B0] it will display the ° symbol.
If you try this with LCDOUT, the value of $B0 displays a - symbol. Which is what it should
be if you look at the LCD data sheet.

You can use extended ASCII characters like "°öµC" with no problem if sending it to an ASCII
terminal program, and it displays each character just fine. It's just no going to produce what
you might expect when formatting data like this for an LCD display. The compiler "assumes"
data is being formatted for an ASCII terminal.

HSEROUT ["º°A",13,10] ' prints º°A to an ASCII terminal. These were entered with ALT 167,
and ALT 248 on the numeric keypad.

LCDOUT $FE,$C0,"º°A" ' produces ]-A on an LCD, but LCDOUT $FE,$C0,"[]{}!@#$%^&*()_+"
prints everything as shown.

Why 2.5 throws the warning up I'm not sure, but it's probably something they should look
into. Or at least indicate in the manual that ASCII codes >127 aren't supported in quotes.

Acetronics2
- 15th October 2007, 19:19
Hi, Bruce,

thanks for your enlightments.

find here the answer from Melabs :

"
For special characters such as this, it is better to specify the
character using its numeric ASCII code. I believe this will work:

LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

I believe you could ignore the warning and the display would be
correct, but it's always a good idea to resolve warnings as they come
up.

Charles Leo
microEngineering Labs, Inc. "

Solution confirmed ... and thanks to melabs.

Alain

Bruce
- 15th October 2007, 19:39
Assuming Tair = 32d;

Which version prints 32°C on your LCD?

LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

or;

LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

or;

LCDOUT $FE,$C0," ", SDEC2 Tair, 223, "C "

BigWumpus
- 15th October 2007, 20:56
My guess: b)

MarioC
- 16th October 2007, 07:08
Hi, Bruce,

thanks for your enlightments.

find here the answer from Melabs :

"
For special characters such as this, it is better to specify the
character using its numeric ASCII code. I believe this will work:

LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

I believe you could ignore the warning and the display would be
correct, but it's always a good idea to resolve warnings as they come
up.

Charles Leo
microEngineering Labs, Inc. "

Solution confirmed ... and thanks to melabs.

Alain



Taking note.....

Acetronics2
- 16th October 2007, 08:16
Assuming Tair = 32d;

Which version prints 32°C on your LCD?

LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

or;

LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

or;

LCDOUT $FE,$C0," ", SDEC2 Tair, 223, "C "




Hi, Bruce

Seems Charles made a little mix ...

LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

Works fine on my testboard with every release ... and shows " xx°C " ( xx is SDEC2 Tair )

The special character code ( use HEX !!! ) is to read from your Display Datasheet table.


Alain

Ioannis
- 16th October 2007, 08:27
Well, if $DF works then 223 will work too, isn't it?

Ioannis

P.S. to Alain. Have you seen the image of the LCDOUT command that I posted on #13? Is this what you typed?

Acetronics2
- 16th October 2007, 08:33
Hi, Ioannis


Well, if $DF works then 223 will work too, isn't it?

> I don't know ... exactly, I don't remember !!! ... the code is given in HEX in the Displays Datasheets ... may be the reason is here !!!

> Will give a TRY in the following minutes ...

Ioannis

P.S. to Alain. Have you seen the image of the LCDOUT command that I posted on #13? Is this what you typed?

>> EXACTLY !!!

Have a nice day

PS: I saw the "Parthenon" had lost some altitude ... Gods will be furious ...

Ioannis
- 16th October 2007, 08:57
I am sure some believers of the old religion will be furious. As for the "gods", I really don't care! They were too human!

Just being curious, what is the meaning of the symbols you were trying to display? I mean OK with the degrees symbol, but the other two?

Ioannis

Acetronics2
- 16th October 2007, 09:10
QUOTE=Ioannis;I am sure some believers of the old religion will be furious. As for the "gods", I really don't care! They were too human!

Hé,hé ... the egg ... or the Hen ..

Just being curious, what is the meaning of the symbols you were trying to display? I mean OK with the degrees symbol, but the other two?

The " ö " is mainly used by people from north Europe

The " µ " ...do not tell me you don't know microfarads ... or µFarads !!!

Both belong to the High part of the Character table ... good reason to use them here .... no ????

An Overall ... µ ( mikro) comes from ancient GREEK alphabet ( alpha, beta, delta, epsillon ...etc. )Boooooooooooooooooooooooo !!!!

Alain

Jumper
- 16th October 2007, 09:11
Hi,

Å Ä Ö (å ä ö) are the last 3 lettters in the Swedish alphabet. They are very useful since it is impossible to spell beer without Ö ---> ÖL

They are common letters but we can do without them if we really have to :-)

/me

Ioannis
- 16th October 2007, 10:18
Hey, hold your horses! I know what μ is. Just did not understood the relation in degrees Celsius, micro and ö, all together!

Ioannis

RYTECH
- 2nd November 2007, 15:22
http://www.melabs.com/resources/pbpmanual/

I'm guessing this online version is for 2.46/2.47 ... the date in the introduction says 5/02

MarioC
- 3rd November 2007, 04:57
It's in the new manual, dated 2007.

You won't find this manual on melabs website.