Up for sale is a 1602 LCD display with integrated serial controller that accepts simple commands. This is the simplest to use serial LCD display for sale, at a bargain price!
Note: Serial voltage is UART level (5V), and meant to be used with a microcontroller, not directly from a PC serial port.
AFmicro LCD Module
The AFmicro Serial LCDs are very functional, low-cost liquid crystal displays that can be easily interfaced to and controlled by a microcontroller using an I/O pin. The LCD displays provide basic text wrapping so that your text looks correct on the display. Full control over all of their advanced LCD features allows you to move the cursor anywhere on the display with a single instruction and turn the display on and off in any configuration. Adjustable contrast and backlit, fixed baud rate 19200 for AF10216A. In addition, you may define up to eight of your own custom characters to display anywhere on the LCD.
Clear 40-pixel characters (8 H x 5 W)
Build in ATS89C2051.
Supports ASCII DEC characters 32-127
Define up to eight custom characters
Automatic text wrapping
Single command cursor placement
Single command clears the display
Define up to eight custom characters
Display type: STN, YG, positive transflective LCD
Software adjustable contrast
YG, Blue and Grey LED for backlit model displays and software controlled backlit brightness
Non-backlit: +5 VDC, 2.0 mA
Backlit: +5 VDC, <40 mA (light on)
Operating temperature: -4 to +158F (-20 to +70C)
Dimensions: NOTE - Board and LCD size and style may vary
2x16: Approx. 1.5 x 3.15 in (38 x 80 mm)
Part number AF10216A-BW,YGB,GB
Display Type STN
Display Mode Blue background with White character.
Yellowish Green background with Black character.
Grey background with Blue character
Operating Temperature -20 C~ +70C
Storage Temperature -30C ~ +70C
Operating Voltage 4.8 ~ 5.2V
Operating Current 2.0mA, 5V
Backlit Color White
Backlit Current < 40mA (Warning: Backlit current must less than 120% x 40mA)
Pin No. Symbol External Connection Function Description
1 RX MPU RS232 Serial input port
2 VSS Power Supply Ground
3 VDD Power Supply Power supply for logic (+5.0V)
Quick Start Circuit
The Serial LCDs should be powered from an external regulated 5 V power supply. Make sure the power supply has an adequate current rating to power the Serial LCD and whichever microcontroller and other devices you are using.
When The LCD display is powered on, it should turn on with the backlight on and display the following text:
Self Test OK!
for a while, then is ready to accept ASCII code and command.
Now that the LCD is set up, it’s time to start sending text to the display. To display a character of text on the Serial LCD, simply send the ASCII code of that character to the Serial LCD over the serial port at the correct baud rate.
When a character is received, the Serial LCD displays that character at the current cursor position and then moves the cursor one position to the right. When you first turn on the LCD, the cursor is in the leftmost position on the top line, as you might expect. The short bar on the bottom of the character shows where the cursor is positioned currently.
Once you’ve sent a full line characters to the LCD, you will notice that the cursor automatically wraps around to the leftmost position of the second line, just like the text in a book. The text will wrap like this at the end of every line, with the end of the bottom line wrapping back around to the top line of the LCD. The text will never “run off” the display; you’ll always see all of the characters you send.
Moving the Cursor
When you send a character to the Serial LCD, it always displays at the current cursor position. There are a few different ways to move the cursor on the Serial LCD display. After each character you send, the cursor automatically moves over one position. Along with this, there is a standard set of cursor move commands including Backspace, Carriage Return, and Line Feed.
The Backspace/Left command (Dec 8, Hex 0x08) moves the cursor one place to the left and the Right command (Dec 9, Hex 0x09) moves the cursor one place to the right. These can be useful for moving the cursor around to overwrite existing text. These commands wrap to the next line of the display, if necessary. The Line Feed command (Dec 10, Hex 0x0A) moves the cursor to the next line of the display without changing the horizontal position of the cursor. The Carriage Return command (Dec 13, Hex 0x0D) also moves the cursor to the next line, but it moves the cursor to the leftmost position on that line as well. The Form Feed command (Dec 12, Hex 0x0C) clears the entire display and moves the cursor to the leftmost position on line 0, just like when you first turn on the display. You will need to pause for 5mS in your code after sending the Form Feed command, to give the Serial LCD time to clear the display. Except for Form Feed, none of these move commands affects the characters on the display.
There are also direct move commands that you can use to move the cursor to any position on the display with a single command. The commands in the range Dec 128(0x80) to 143(0x8F) and Dec 148(0x94) to 163(0xA3) move the cursor to the 16 different positions on each of the two lines of the LCDs.
Controlling the Display
You also have control over the various display modes of the Serial LCD. The display-off command (Dec 21, Hex 0x15) turns off the display so that all of the characters disappear. The characters aren’t erased from the display, though, and you can even keep writing new characters to the display when it is turned off. A trick to make a lot of text show up all at once, is to turn off the display and then send all of your text. Then, when you turn the display on again, all of the text appears instantly.
The display-on commands (Dec 22 to 25, Hex 0x16 to 0x19) turn the display back on and also control whether you want to display the cursor and/or make the cursor character blink. The cursor is the short bar that shows up below the character at the current cursor position. The blink option makes that character blink on and off repeatedly. You can turn the cursor and blink options on or off, in any combination, as listed in the command set table. You can change the cursor and blink mode even if the display is already on; you don’t need to turn it off and then back on again.
You can also control the backlight of the display. The backlight lights up the display so that it is easier to see in the dark. There are commands to turn the backlight on (Dec 17, Hex 0x11) and off (Dec 18, Hex 0x12). You can also control the brightness of the backlit by send commands (Dec 26 to 35, Hex 0x1A to 0x1F) with 26(0x1A) most bright.
The Serial LCD has the capability to store up to eight user-defined custom characters. The custom characters are stored in RAM and so they need to be redefined if you turn off the power. You can display the custom characters by sending the commands Dec 0 to 7 (Hex 0x00 to 0x07), as shown in the command set table. The custom character will display at the current cursor position.
The custom characters are five pixels wide by eight pixels high. Each of the characters is stored as a series of eight data bytes where the low five bits of each byte represent a row of pixels in the character. The high three bits of each byte are ignored. A bit value of one turns that pixel on (i.e. makes it black). The bottom row of pixels is often left blank (all zeros) to make it easier to see the cursor.
To define a custom character, you will send a total of 9 bytes to the Serial LCD. The first byte needs to be a valid define-custom-character command (Dec 248 to 255, Hex 0xF8 to 0xFF) and must be followed by eight data bytes that define the pixels of the character. The Serial LCD will always use the next eight bytes it receives to set the pixels of the character. The data bytes define the character starting at the topmost row of pixels
The tables on the following pages list all of the valid Serial LCD commands. Commands marked as N/A are invalid and are ignored. The lines of the LCD display are numbered starting from 0, with line 0 being the top line. The character positions on each line are numbered starting from 0, with position 0 being the leftmost position on the line.
Each item will be tested before shipping. A not DOA guarantee exists. To qualify, the buyer must return the product at his or her expense within 7 days.