16,012,316 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sabridemirel (Top 14 by date)
sabridemirel
9-Jan-14 6:18am
View
Appear a vertical scroll.or no scroll
sabridemirel
19-Sep-13 5:07am
View
Thanks, solved problem
sabridemirel
18-Sep-13 15:12pm
View
Thank for replies.I try two different connection string:
SqlConnection connection = new SqlConnection("Data Source=localhost;Initial Catalog=SABRI-PC\SQLEXPRESS;Integrated Security=True");
SqlConnection connection1 = new SqlConnection(@"Server=localhost;Database=SABRI-PC\SQLEXPRESS;User ID=sa;Password=Sd0226535;Trusted_Connection=False;");
I allow the remote connections.
I completly turn off my firewall.
sabridemirel
30-Mar-11 2:23am
View
It seems working no any error.But the LCD do not show anything.
ı post another manual.it say that
Definition of Host ABSTRACT
Revision 00
Page 1 of 4
1 General
This document defines the message contents for controlling LCD devices with dot matrix dis-plays. A description of all available commands and responses is given. For data transmission purposes, these messages are to be packed into the MIS1 protocol frame.
2 Message Overview
The message content is laid down as follows:
Code
Command ID
Data
Code
Code byte, defines the type of message (see chapters below).
Command ID
Command identification for given error notifications (0x00 - 0xFE). It can be used for associating notification messages (from the controller) with command messages (from the host). An ID of 0xFF is reserved for sponta-neous notifications.
Data
Payload / user data.
Messages can have a maximum data length of 253 bytes (including code and command ID).
Message overview:
Host computer → Matrix controller
Code byte
Text messages
Group 0x10
Text to position x/y
0x18
Matrix controller → Host controller:
Code byte
Notification messages 1st group
Group 0x80
Error notification
0x8C
Definition of Host ABSTRACT
Revision 00
Page 2 of 4
3 Messages
Note:
All numbering details (image number, line number, number of gap bytes etc.) are counted from 0.
3.1 Host computer Matrix controller
3.1.1 Write text at position x/y
This message allows a text to be freely positioned on the panel with the "normal", "flashing", and "inverse flashing" attributes. Two font types are available.
0x18
ID
1st byte, 2nd byte ...
ID: Command ID
1st byte: Image number m
2nd byte: Font number
3rd byte: Horizontal position x (high byte)
4th byte: Horizontal position x (low byte)
5th byte: Vertical position y (high byte)
6th byte: Vertical position y (low byte)
7th byte: Text range width w in pixels (high byte)
8th byte: Text range width w in pixels (low byte)
9th byte Text data or attribute information
10th byte: …
Text position:
Specified is the upper left corner of the text:
In case the given text does not fit into the specified text range width overflowing text will be cut off. Halving of letters is not supported, only entire letters are clipped. Setting a text range width of 0 writes the text on the display panel without any error checks.
Definition of Host ABSTRACT
Revision 00
Page 3 of 4
Attribute information:
Text attributes are tags for modifying the text presentation. They can be inserted anywhere in the text data stream. For attribute recognition a 0x00 byte must be sent followed by the actual attribute byte (see below).
Interpretation of the attribute byte is as follows:
Bit
7
6
5
4
3
2
1
0
MSB
LSB
Bit 0:
Value:
1
flashing
0
not flashing
Bit 3:
Value:
1
inverse flashing
0
not inversely flashing
All remaining bits:
Not used, should be set to 0 for subsequent extensions.
Inverse flashing characters are switched on when a flashing character is switched off. This en-ables characters, for instance, to jump between two positions.
Definition of Host ABSTRACT
Revision 00
Page 4 of 4
3.2 Matrix controller Host computer
3.2.1 Error notification
0x8C
ID
1st byte, 2nd byte
ID: Command ID that is triggering the error notification
1st byte: Code that is triggering the error notification
2nd byte: Error number
Valid error numbers:
Number
ECS symbolic name
Description
1
CLIPPED
Display information shown in a clipped form
2
ECHAR_ATTRIBUTE
Invalid attribute for text output
3
ERANGE
Overflow of a command parameter
4
EOPTION
Invalid parameter in the command
5
EPAGE
Invalid image number
6
EFONTMISS
Font not defined
7
EALLOC
Memory cannot be allocated e.g. too many flow text sectors
8
EFLOWTEXT
Too many flow texts
9
EUNKNOWNCOMMAND
Unknown/unsupported command
sabridemirel
29-Mar-11 10:11am
View
ı am sorry but it is also not working.:(
sabridemirel
29-Mar-11 9:34am
View
32,0,1 is self test command for LCD.I have already try to send commands for writing "ABC" but it is not working.
and i have to write something on the LCD
sabridemirel
29-Mar-11 8:37am
View
i post my code
thank you
m_socClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
string szIPSelected = txtIPAddress.Text;
String szPort = txtPort.Text;
int alPort = System.Convert.ToInt16 (szPort,10);
System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint remoteEndPoint = new System.Net.IPEndPoint(remoteIPAddress, alPort);
m_socClient.Connect(remoteEndPoint);
byte[] message = new byte[] {0x32, 0x0, 0x1 };
m_socClient.Send(message);
sabridemirel
29-Mar-11 8:17am
View
ı think that ı miss something.i send the data in hex format byte by byte but it is not working.may be somebody can help me abıut the missing point
for example how can ı prepare the MIS1 package
sabridemirel
29-Mar-11 7:22am
View
the demo hasn't got source code.if you give me your mail ı can post to you.
ı paste it here if you want i can post it to you by email
MIS1 communication over TCP/IP
In order to exchange information with an LCD controller all data must be wrapped into an MIS1 frame according to the Definition of Host (DoH). The following table shows all transport layers:
# Layer Function
7
Data
MIS1, DoH
6
5
4
Transport
TCP
3
Network
IP
2
Data Link
Ethernet
1
Physical
Table 1: OSI model
In the example below the required MIS1 frames for displaying a given text sequence on the display (command 0x18, see Definition of Host) are illustrated.
1. Sending the command
At first, the host sends the command to the LCD controller with slave address 1 which contains all necessary information:
>>>[19] 0x04 0x81 0x02 0x18 0x01 0x01 0x00 0x00 0x10 0x05 0x00 0x0A
0x00 0x40 0x41 0x42 0x43 0x03 0xB2
Control characters: 0x04 0x02 0x03
Slave address: 0x81 Address 0x01 OR 0x80
Code and Command ID: 0x18 0x01
Data payload: 0x01 Image number, 1
0x00 Font number, 0
0x00 0x05 Horizontal position x, 5px
0x00 0x0A Vertical position y, 10px
0x00 0x40 Text range width w, 64px
0x41 0x42 0x43 Text data, “ABC”
Escape character: 0x10
Checksum: 0xB2
As the data payload byte 0x05 is a control character (ENQ) it has to be escaped with 0x10 (DLE). The checksum is an arithmetic sum counting all bytes after 0x02 (STX) including 0x03 (ETX) – any DLE characters (0x10) must be ignored! Thus the sum can be calculated as:
0x18 + 0x01 + 0x01 + … + 0x42 + 0x43 + 0x03 = 0x0132 OR 0x80 = 0xB2
2. Receiving the acknowledgement
When a command has been sent to a slave controller it immediately replies with either an ACK (0x06, positive) or a NAK (0x15, negative) byte. This returned byte only informs the host about the MIS1 frame syntax, not about the correctness of the command itself.
<<<[1] 0x06
Status byte: 0x06 Command syntax OK
3. Requesting the status
In order to check whether a previously sent command has been accepted or an error occurred, the host can request the status of the client by sending an enquiry.
>>>[3] 0x04 0x81 0x05
Control characters: 0x04 0x05
Slave address: 0x81 Address 0x01 OR 0x80
4. Receiving the error notification
In case the command from the first step did not generate an error the slave controller will simply respond with a single NAK (0x15) byte.
<<<[1] 0x15
Status byte: 0x15 No error available
Otherwise an appropriate error notification message will be returned to the host. For example if the text range width was chosen too small for the transmitted text array the following notification would be sent:
>>>[3] 0x04 0x8C 0x01 0x18 0x01 0x03 0xA9
Control characters: 0x04 0x03
Code and Command ID: 0x8C 0x01 Command ID generating the error
Data payload: 0x18 Code generating the error
0x01 Error code, “CLIPPED”
Checksum: 0xA9
sabridemirel
29-Mar-11 7:16am
View
yes,the device has a demo program and ı can use it.ı have manual about communication.where can ı post it to?
sabridemirel
29-Mar-11 7:05am
View
I changed the code and try again.
ı send the message like this
byte[] message = new byte[] { 0x32, 0x0, 0x1};
but its not working
thank you for your support but do you any other idea.
i have to do it
sabridemirel
29-Mar-11 6:58am
View
nothing,it seems working but nothing change onthe LCD monitor
sabridemirel
29-Mar-11 6:45am
View
I use this cod but itis not working
do you any other idea
thank you
m_socClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
String szIPSelected = txtIPAddress.Text;
String szPort = txtPort.Text;
int alPort = System.Convert.ToInt16 (szPort,10);
System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint remoteEndPoint = new System.Net.IPEndPoint(remoteIPAddress, alPort);
m_socClient.Connect(remoteEndPoint);
byte[] message = new byte[] { 32, 0, 1 };
m_socClient.Send(message);
sabridemirel
29-Mar-11 6:42am
View
I use this cod but itis not working
do you any other idea
thank you
m_socClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
String szIPSelected = txtIPAddress.Text;
String szPort = txtPort.Text;
int alPort = System.Convert.ToInt16 (szPort,10);
System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint remoteEndPoint = new System.Net.IPEndPoint(remoteIPAddress, alPort);
m_socClient.Connect(remoteEndPoint);
byte[] message = new byte[] { 32, 0, 1 };
m_socClient.Send(message);
Show More