|
Serial
Display Module - C# Examples |
|||||||||||
Example 1 : Sending ASCII text to SC6Dlite with serialport This project shows how to send ASCII characters to be displayed on SC6Dlite serial LED display with Microsoft Visual C# Download source code here. |
||||||||||||
public
partial class Form1 : Form { byte[] txbuff = new byte[10]; // Byte array for the transmit data byte uid = 255; // SC6Dlite uid public Form1() private void button1_Click(object sender, EventArgs e) |
||||||||||||
Example 2: Send fixed and marquee
text to SC1602A
byte[ ] lcd_command = {11,12,13,254,45,1}; the lcd_command byte array is initialize to the command byte value of all the lcd command used in this example. 11 is LCD Home command, 13 is the Clear LCD command and ( 254,45,1 ) is the clear row 1 3 bytes command. Refer to the SC1602A user's manual for command details. At the start of the program, a clear lcd command were issued using: serialport1.Write ( lcd_command, 2, 1); which will send single byte 13 ( 0x0D) to the LCD to clear the screen. To print text on row 1 Clear row 1 and set the cursor to the beginning of row 1, then send the text in textbox2 to the LCD. serialport1.Write
( lcd_command , 3, 3, ); To implement text marquee or scrolling text, the text is first converted to byte array. Then load and send the byte array every 500ms using timer1 tick event handler. Example 2 source code here |
||||||||||||
Copyright©
SILICON CRAFT 2006 |