help with commards on lk202-25 serial display
help with commards on lk202-25 serial display
hey there .
im trying to send commards ect such as clear to my display from visual basic . i can send text ok . But i cant seem to work out how to use the commard functions. im not sure what the sytax is. Im am confused from the data sheet.
i have been using hyperterm to test things .
please could someone give me an example of sending commards to display via hyperterm ect . or even better a vb snipet .
clear display or turn backlight off and on ect something simple .
any help would be great
cheers .
luke
im trying to send commards ect such as clear to my display from visual basic . i can send text ok . But i cant seem to work out how to use the commard functions. im not sure what the sytax is. Im am confused from the data sheet.
i have been using hyperterm to test things .
please could someone give me an example of sending commards to display via hyperterm ect . or even better a vb snipet .
clear display or turn backlight off and on ect something simple .
any help would be great
cheers .
luke
hey thanks for your quick reply .
um i am using visual basic 2008 express .
like i said i can sent txt but it just wraps from row to row .
i just want to work out the commards to
simply clear the display
write to row 2 ect
any ideas ?
cheers luke
um i am using visual basic 2008 express .
Code: Select all
Dim display As SerialPort
'Creates and opens the serial port.
display = New SerialPort("COM1", 19200, Parity.None, 8, StopBits.One)
display.Open()
display.Write("hello")
display.Close()
End Sub
like i said i can sent txt but it just wraps from row to row .
i just want to work out the commards to
simply clear the display
write to row 2 ect
any ideas ?
cheers luke
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
Well once you get that far its not that hard, for clear screen for example the manual tells you
Dim ClearScreen As Byte() = {254, 88}
Display.Write(ClearScreen, 0, ClearScreen.Length)
so the following code should do the trick6.1.2 Clear display (254 88)
This command clears the display and resets the text insertion point to the top left of the screen.
Dim ClearScreen As Byte() = {254, 88}
Display.Write(ClearScreen, 0, ClearScreen.Length)
Hi all,
I'm new to the Serial port communication. I tried out your coding style with a few adjustments for Visual C++ and it works. Below is my code
I tried to use portmon to check what is happening.
MOGD# sends 2 lines of data but my program sends at least 10 lines.
Is there any thing wrong with my code? or should I find another way to send data over? Please advise.
Truly appreciated,
I'm new to the Serial port communication. I tried out your coding style with a few adjustments for Visual C++ and it works. Below is my code
However there seems to be a bit slower compare to MOGD program.array<System::Byte>^ code = {0xFE, 0x46};
this->port->Open();
this->port->Write(code, 0, code->Length);
this->port->Close();
I tried to use portmon to check what is happening.
MOGD# sends 2 lines of data but my program sends at least 10 lines.
Is there any thing wrong with my code? or should I find another way to send data over? Please advise.
Truly appreciated,
Last edited by Phutisarn on Wed Nov 12, 2008 7:14 am, edited 1 time in total.
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
mogd# is written in C# so is using the same serial port class you are, here's the code that opens the port and sets it up
Code: Select all
_Port = new SerialPort(comPort,speed);
_Port.Handshake = System.IO.Ports.Handshake.None;
_Port.ReceivedBytesThreshold = 1;
_Port.WriteBufferSize = 16;
_Port.Open();
Thank you very much Ray. I will check the code and implement it to my program.
My apology for putting the incorrect information in the previous post. I was using MOGD not the MOGD#. I just found the new version and it seems to have a bit of delay just like my program too.
Is there a significant different between two programs? Please advise.
Thanks again for your quick reply.
My apology for putting the incorrect information in the previous post. I was using MOGD not the MOGD#. I just found the new version and it seems to have a bit of delay just like my program too.
Is there a significant different between two programs? Please advise.
Thanks again for your quick reply.