Page 1 of 2

Posted: Tue Dec 04, 2001 11:45 am
by Henry
Here is the discusion for the port of LCD Samrtie for MO displays!!!

Post any suggestions or bugs here.

Author: BasieP


_________________
Henry J.
Technical Support
Matrix Orbital

<font size=-1>[ This Message was edited by: Henry on 2001-12-04 11:53 ]</font>

Posted: Tue Dec 04, 2001 11:54 am
by BasieP
Okay i am now making a serial driver for LCD smartie, just begon, and for so far the only trouble i had was with Delphi 5, and the component for the serial port..
the damn thing doesn't like to be installed somehow.. :sad:

Posted: Tue Dec 04, 2001 12:02 pm
by relix
lol, so it was you that asked for the component!

well, for all the other who don't know what component to use: I use the TVaComm of varian software (http://www.varian-software.com).

Posted: Tue Dec 04, 2001 12:25 pm
by BasieP
no i think henry asked you, i got it from him..
But it works now
:wink:

Posted: Tue Dec 04, 2001 1:02 pm
by BasieP
relix, u use that component as well u said.
How do you chose ur comport?

Posted: Tue Dec 04, 2001 1:04 pm
by relix
lol
took me a long time to find that one too!
the property is "NumPort" and it is published :razz:
edit: here's some sourcecode (didn't tested it though):

Code: Select all

procedure ChooseComPort(const comport: byte); [i]//comport = number of the port[/i]
begin
 VaComm1.Close; [i]//dunno if it's necessary, but I do it this way[/i]
 VaComm1.NumPort := comport; [i]//change comport[/i]
 VaComm1.Open, [i]//again, don't know if it's necessary, but it [b]is[/b] when you closed it first (duh)[/i]

end;


<font size=-1>[ This Message was edited by: relix on 2001-12-04 13:09 ]</font>

Posted: Tue Dec 04, 2001 1:10 pm
by Henry
And there was life :smile:

Posted: Tue Dec 04, 2001 1:12 pm
by relix
he, je bent van nederland! veel nederlands-sprekenden hier :razz:

Posted: Tue Dec 04, 2001 1:18 pm
by BasieP
got it

<font size=-1>[ This Message was edited by: BasieP on 2001-12-04 13:21 ]</font>

Posted: Tue Dec 04, 2001 1:25 pm
by relix
alright, that's easier then you think ('k spreek engels omdat dan andere mensen er ook nut van kunnen hebben :razz: ), just use WriteText:

Code: Select all

procedure SetBacklight(SetOn: boolean; Minutes: byte = 0);
begin
 if SetOn then
  VaComm1.WriteText(Chr(CMD_PREFIX) + Chr() + Chr(Minutes))
 else
  VaComm1.WriteText(Chr(CMD_PREFIX) + Chr());

end;
with

const
CMD_PREFIX = $FE;

heb je het? dus gewoon WriteText, en dan met Chr(integer)

Posted: Tue Dec 04, 2001 1:51 pm
by BasieP
driver is done :wink:

Posted: Tue Dec 04, 2001 8:59 pm
by Henry
and you are not posting a link because????

:grin:

Posted: Wed Dec 05, 2001 1:28 am
by BasieP
:?
sorry because of what should i post a link to what?

i have some problems building the driver into LCD Smartie...

When i run smartie for a short while with that driver, i get the message 'Buffer is full! Check Your Comport.'
Is it so that that component only sends when there is a device on the comport?
or am i sending the data to fast, so that the comport can't handle the speed?


Ow, and i also need to know how i set my cursor on a specific place.
I mean that i have to write the 3rd line.
And does the first char begins on place 1, or place 0 in the line?

<font size=-1>[ This Message was edited by: BasieP on 2001-12-05 01:57 ]</font>

Posted: Wed Dec 05, 2001 4:53 am
by relix
Dunno about that buffer stuff, never had it before, and I can't check it yet because I don't have an lcd yet.

About the change-pos stuff, this is the function I use:
(again CMD_PREFIX = $FE)

Code: Select all

procedure SetPos(const Column,Row: byte);
begin
 VaComm1.WriteText(Chr(CMD_PREFIX) + 'G' + Chr(Column) + Chr(Row));

end;
and in the manuals there is this:

Go To Position
ASCII 'G', Hex 47, Decimal 71
Syntax 0xFE 0x47<column number><row number>
To set the current cursor position, send a command prefix followed by the character 'G' and two values defining the column and row of the desired cursor position. Example:

<command prefix> 0xFE
<command> 0x47
<column number> 0x01 to 0x14 for a twenty column display
<row number> 0x01 to 0x04 for a four line display


hope this solves your problem

rl.

edit: the $47 doens't appear in the code block, replaced it by G

<font size=-1>[ This Message was edited by: relix on 2001-12-05 04:56 ]</font>

Posted: Wed Dec 05, 2001 7:10 am
by BasieP
yes thanx

procedure SetPos(const Column,Row: integer);
begin
VaComm1.WriteText(Chr($0FE) + 'G' + '$' + IntToHex(StrToInt(Column),3) + '$' + IntToHex(StrToInt(Row),3));
end;


that's a rebuild of ur procedure
i hope it's working, because i can't test it.. No LCD :sad:

btw: the UBB code is krunking up my code

cool!
i found a big bad bug in UBB!
it has trouble with the '$'!


<font size=-1>[ This Message was edited by: BasieP on 2001-12-05 08:00 ]</font>