How to connect, how to control 8888-Display by Serial RS232
|
The displays model
8887-Display WiFi Serial for Arduino Raspberry(*) and
8888-Display RS485 ModBus MQTT can be controlled via the
RS232 serial interface in the very simple way explained below; the
serial interface is included even on the simplest models of Arduino or Raspberry, and a thousand other controllers have it, it is of immediate use (eg
Serial.print() ), and therefore using 8888 or 8887 via serial is a fast and inexpensive to add a large display to your Arduino, Raspberry, ESP projects or whatever it is.
Quick resume, 8888-Display can be controlled with:
Serial link / RS232
You do not need all the wires of the SERIAL connection but it is sufficient to connect the TX output of your device (to RX), and GND. They must be connected either to RX / GND circuit pads for the RAW version (TX to RX; GND to GND), or to the terminals, or, when present, to the 3.5mm DC plug (internal TX / R external GND).
The voltage allowed is between 0 and 5V (possibily 0 and 3.3V), some serial outputs such as PCs with DB9 may require a common converter (you can get VCC from the 5V pin or terminal on 8888-Display).
It works without converters if used with common USB to Serial keys, where you use the pins marked GND and TX.
It is then obviously needed to check that the BAUD speed setting is the same both for your transmitter device (PC, Raspberry, Arduino, etc.) and for the 8888-Display.
The configuration of the 8888-Display baud rate is done by connecting to the internal WiFi (wfeasy.com) and to the internal website (wfeasy.com) and choosing from the drop-down menu on the Settings page.
Serial commands
Generally each command is a string that begins with the requested command as the first Char, continues with a text or a number in ASCII characters, and ends with the ASCII character LF or # 10, or 10 decimal, or \n in the conventional representation in C and many other programming languages (in the examples in the following commands we will use the latter convention, ie for example \2 means the ASCII character # 2 or decimal 2).
Command 12 (#12 o \12 o 0x0c)
Shows the string on the display, scrolling if the length of the string is greater than the available characters.
Examples:
\128765\n
Shows 8765
\12Hello guys!\n
Shows Hello guys! with automatic continued scrolling
\12@Hello guys!\n
Shows Hello guys! with scrolling, one time
Here a example with a Serial tool, connected to a USB to serial key on the PC, connected on COM3. We used the second box from the bottom (Hercules converts $0C to 12 and $0A to 10 or \n).
Command 11 (#11 o \11 o 0x0b)
It shows the string on the display, scrolling if the length of the string is greater than the available characters, once, then returns to showing what it was previously showing. The string is max 252 characters.
Examples:
\11Hello girls!\n
Shows Hello girls! with scrolling, one time, then come back to the previous display function
Command 2 (#2 o \2)
It shows on the display a timer in seconds.hundredths, starting from the hundredth supplied in input.
Examples:
\20\n
Starts and displays a timer starting at 00.00
\212\n
Starts and displays a timer starting from 00.12
\2s\n
Stop the timer at the time reached.
\2S1234\n
Stop the timer at 12.34
Command 3 (#3 o \3)
Puts the display in clock mode, setting the time if necessary.
Examples:
\31230\n
Starts the clock at 12.30 and displays the clock from now on.
\3n\n
From now on it displays the clock.
Command 4 (#4 o \4)
Set the brightness (or max brightness), the number goes from 0 to 100.
Examples:
\490\n
Set the brightness (or max brightness) to 90.
\4a\n
Activate automatic brightness control.
\4d\n
Deactivate automatic brightness control.
Command 5 (#5 o \5)
Set the scrolling speed in hundredths of a second (default 25; minimum 5; step 5)
Examples:
\540\n
Set the scrolling to 40 hundredths of a second.
Example of Arduino or ESP program to write something on 8888-Display
Program section to write "8765" on the display:
Serial.begin(19200); //initialize serial at 19200 baud; or 115200 or other
Serial.print('\12'+"8765\n");
Program section to write "hello beautiful world!" on the display (with scrolling):
//initialize serial like above, then
Serial.print('\12'+"hello beautiful world!\n");
Program section to write the numeric variable on the display num:
//initialize etc, then
Serial.print('\12'+String(num)+'\n');
Program section for setting the display brightness to 100:
//initialize etc, then
Serial.print('\4'+"100\n");
Here are the quick manuals for some other products:
(C) 2022 VisualVision