LCDproc development and user support list

Text archives Help


[Lcdproc] Sending commands to Lcd Display


Chronological Thread 
  • From: Kaya Saman <kayasaman AT gmail.com>
  • To: lcdproc AT lists.lcdproc.org
  • Subject: [Lcdproc] Sending commands to Lcd Display
  • Date: Mon, 5 Aug 2019 18:47:02 +0100
  • Authentication-results: mail.cosmopool.net; dkim=pass reason="2048-bit key; insecure key" header.d=gmail.com header.i=@gmail.com header.b=fhk7/YBD; dkim-adsp=pass; dkim-atps=neutral

Hi,


I would like to write a driver for the Newhaven Display series: https://www.newhavendisplay.com/nhd0220d3zflgbwv3-p-5742.html

for Lcdproc.


I have both blue/white and green/yellow displays connected via RS232 -> TTL level shifter then to the 3V uart pins on a Pine64-LTS.


The displays are functioning fine as characters are displayed when running LCDproc with different drivers but of course these are just random characters.


The code set for the display is here: http://www.newhavendisplay.com/specs/NHD-0220D3Z-FL-GBW-V3.pdf


There is also a driver written for Lcd4Linux: https://lcd4linux.bulix.org/browser/trunk/drv_Newhaven.c


I'm just wondering how to test out the command set on the display?


Taking the example of clearing the screen; so far I have tried using the 'echo' command:


echo -en '\xfe\x51' > /dev/ttyS2 but unfortunately nothing seems to be happening :-(


More searching on the subject also found this link: http://www.linuxfocus.org/English/July2000/article165.shtml

though it's for MatrixOrbital displays I tried to adapt the perl script shown here:



#!/usr/bin/perl -w
open(LCD,">/dev/lcd")||die "ERROR: can not write to /dev/lcd\n";
$|=1;
my $i=0;
while(1){
    $i++;
    print LCD chr(0xFE),"X"; # clear the display
    print LCD "Count $i\n";
    sleep(1);
}
close LCD;


Of course changing the /dev line to /dev/ttyS2 but also the: print LCD chr(0xFE),"X"; # clear the display line to:


print LCD chr(0xFE),"51"; # clear the display. Unfortunately this didn't work also :-(


Even the sample code from the manufacturer: https://www.newhavendisplay.com/app_notes/Serial_LCD.txt

has this statement in it:


/********************************************************************
 lcd clear
********************************************************************/
void lcd_clear(void)
{
    tx_packet[0] = 0xFE;
    tx_packet[1] = 0x51;
    send_packet(2);
    delay_ms(10);
}


How would I send this to this display from the shell, as I want to get a handle of how the commands work?? I am using both Bash shell in Armbian and csh in FreeBSD.


Many thanks for any feedback!


Regards,


Kaya



  • [Lcdproc] Sending commands to Lcd Display, Kaya Saman, 08/05/2019

Archive powered by MHonArc 2.6.18.

Top of page