Follow Me On...

LM780C LED Moving Message Sign Reverse Engineering

Link to the LM780C

I purchased this display because i found it in the back of my Nuts & Volts magazine and it was cheaper then other models i had seen.  Upon receiving the unit i was disappointed (but not suprised) that there was no documentation on how to program the device using the RS232 port.  After calling the company, they told me the software was developped in china and so if they did have the protocol written down somewhere it would probably be in chinese.  So, i reverse engineered the protocol.

I installed the software they supplied with the unit on an old laptop since it would only run on windows 9x and connected a null modem cable between the serial port of the laptop and my desktop computer.

Using Realterm i sent a message "ABC" over and over again changing parameters such as font, speed, color, and movement method.

I wasn't concerned much about the movement methods or fonts but what i found out I listed here for anyone else who might want to interface with the LM-780 display.

Message Format:

 
Note: the notation is a modified bnf format.  ::= means "is defined as" and the | means "or" and the <> angle brackets surrond category names.  All the numbers below are unsigned integers.  In the examples you will see (65 66 67) dec  == (ABC)ascii.
 

<Start> <file #>  48 49 <opt. moving method> 239 <opt. speed> <Color> 239 <Font> 160 <Message> <End>

<Start> ::=  0 255 255
<End>  ::=  255 255 0
<File #> ::= the file number for example for file number 1 you'd do "0 1" for 2 you'd do "0 2"

<opt. moving method> ::=

1    (CYCLIC Default Randomly cycles through all the display styles and color options.)  |
2    (IMMEDIDATE Immediate)  |
3    (OPEN FROM RIGHT Open/push from right to left.) |
4    (OPEN FROM LEFT Open/push from left to right.)  |
5    (OPEN FROM CENTER Open from center to edge)  |
6    (OPEN TO CENTER Open from edge to center)  |
7    (COVER FROM CENTER Cover from center to edge)  |
8    (COVER FROM RIGHT Cover from right).  |
9    (COVER FROM LEFT Cover from left.)  |
10  (COVER TO CENTER Cover from edge to center.)  |
11  (SCROLL UP Scroll/push up.)  |
12  (SCROLL DOWN Scroll/push down.)  |
13  (INTERLACE TO CENTER Interlace from edge to center with previous screen.)  |
14  (INTERLACE COVER Interlace cover horizontally with previous screen.)  |
15  (COVER UP Cover up.)  |
16  (COVER DOWN Cover down.) |
17  (SCAN LINE Yellow dot scan from left to right from top row down, changing each pixel as it moves over it).  |
18  (EXPLODE Exploding firework.) |
19  (PAC MAN PAC-Man chomps from left to right.)  |
20  (FALL & STACK Falls down and stack up like sand in an hourglass.)  |
21  (SHOOT Pixels are shot from right to left moving up and down.)  |
22  (FLASH Flashes several times.)  |
23  (RANDOM Each pixel is randomly changed.)  |
24  (SLIDE IN Pieces are slide in from right to left.) | <nothing>

<speed> ::=  a number from 192 to 199 where the fastest speed is speed 1 = 192 and the slowest is 199.  The default speed is speed 3 which equals 192 + 3 = 195.  After setting the speed you must then send 239..

<Color> ::=  Yellow = 180, Green = 182, red = 177, Bright Red = 176

<Font> ::=  7x6 (default) = 162,  7x17 Extra Wide = 165

<beep> ::= 224 followed by sending 239


Examples:

0 255 255 0 1 48 49 3 239 176 239 162 65 66 67 255 255 0
The string above sets the message to "ABC" , to open from right with bright red text  and 7x6 font, the speed isn't spedified so it's set to the default which is 3.

An equivalent string which sets the speed to speed 3 is:
0 255 255 0 1 48 49 3 239 176 239 195 239 162 65 66 67 255 255 0

Another example:
This flashes ABC at a pretty fast rate in bright red letters:
0 255 255 0 1 48 49 22 239 176 239 162 65 66 67 255 255 0

 


 

Example Code:

The following code is code written in PIC-C a compiler made by CCS for pic microcontrollers.       

      // Sets the RS232 Communication to use the microcontroller pin C6 for transmitting and C7 for receiving
      #use rs232(baud=2400, xmit=PIN_C6, rcv=PIN_C7)

      // start sequence
      putc(0);
      putc(255);
      putc(255);
      putc(0);    // file number digit 1
      putc(1);    // file number digit 2
      putc(48);
      putc(49);
      putc(3);     // opens from the right
      putc(239);
      putc(176); // bright red
      putc(239);
      putc(162); // 7x6 default font
     
      printf("this is the message");

      // end sequence    
      putc(255);
      putc(255);
      putc(0);