Serial UART Input, Easy to use for static and scrolling messages.
Display accepts simple string through uart and implements scrolling of the text on LED Matrix display. You can connect microcontrollers directly to update the string or connect to PC to send string to scroll. It supports different scrolling speeds.
It even supports static display of text without scrolling.
Format for sending string is very simple and it can accept maximum of 255 characters of ASCII text. We have provided sample source code for testing with microcontroller as well as details on testing with PC terminal software.
Features
There are just three pins to use the display.
Input serial data of 3-5V logic level, Usually connected to TXD pin of microcontrollers/PC/RS232.
Note: Do not connect this pin to direct PC serial port without MAX232. It will damage the display since direct PC serial port has +12V/-12V voltage level.If you wish to set a string for scrolling it can be maximum 255 characters. The baud rate of input to display is 9600 bps. The string starts with ! exclamation character which is marked as start of string idenfier. The string ends with CR (Carriage return, '\r', 0x0D, 13 in decimal) which is acting as line feed character or End of string idenfier. In between the ! and CR are maximum 255 bytes ASCII string to be scrolled.
Example string on screen would be strings like below,
!TEST STRING <-Enter Key(0x0D, decimal 13)
There are many scrolling speed supported by display. You can send HEX values as below to set scrolling speed.
0xF0 = Static Mode, No scrolling, Dispays the text buffer without scrolling.
0xF1 to 0xFF = You can send any hex values frmo 0xF1 to 0xFF, where 0xF1 is the fastest and 0xFF is the lowest scrolling speed. Default power up speed is medium at 0xFA
To connect to PC you can use either a simple MAX232 circuit to convert display’s TTL level of 5V to RS232 level or you can use a USB to TTL UART board. Either way you can get a serial port on PC to connect to and send string.
We recommend this Terminal software which can be used test display by sending serial data from PC side.
Use a MAX232 circuit like below to convert display's 5V level to RS232 level
You can use a USB to UART adapter to connect to display. Since it takes around 800mA power, Do not use power from USB. Our USB to Serial TTL UART adapter model 1151 will appear as virtual serial port on PC to which you can communicate through any software which can transmit receive by this serial port like hyperterminal or custom made software.
It’s very easy to interface with microcontroller having UART at 3V or 5V level. Configure your microcontroller to communicate at 9600 baud rate. Send Ascii string in following format. Note the string to display starts with exclamation mark(!) and end with CR (Carriage return, '\r', 0x0D, 13 in decimal).
Before approaching to microcontroller interfacing, we recommend to try on PC first with terminal software.
In Keil C51 compiler you can write simple code as below to send sample string.
#include <REGX51.H> #include <stdio.h> // for printf // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Setup Serial port for printf -= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void init_serial( void ) { //9600 bps @ 11.059 MHz SCON = 0x50; /* Setup serial port control register */ /* Mode 1: 8-bit uart var. baud rate */ /* REN: enable receiver */ PCON &= 0x7F; /* Clear SMOD bit in power ctrl reg */ /* This bit doubles the baud rate */ TMOD &= 0xCF; /* Setup timer/counter mode register */ /* Clear M1 and M0 for timer 1 */ TMOD |= 0x20; /* Set M1 for 8-bit autoreload timer */ TH1 = 0xFD; /* Set autoreload value for timer 1 */ /* 9600 baud with 11.0592 MHz xtal */ TR1 = 1; /* Start timer 1 */ TI = 1; /* Set TI to indicate ready to xmit */ } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Delay x ms -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void delay_ms(int x) // delays x msec (at fosc=11.0592MHz) { int j=0; while(x>=0) { for (j=0; j<100; j++); x--; } } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Main -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void main() { delay_ms(100); // power stabilize init_serial(); // setup C51 serial port printf("!Welcome to Sunrom\r"); // Send string to display putchar(0xFB); // set scrolling speed while(1) { } }
Following are the ASCII font characters implemented on display. You can use any of these characters to send as ASCII to display.